Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3991962
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:40:43+00:00 2026-05-20T06:40:43+00:00

File f = new File(fileExportPath); // D:/temp if(!f.exists()) { f.mkdir(); } f.setWritable(true); f.setExecutable(true); String

  • 0
File f = new File(fileExportPath); //   D:/temp
    if(!f.exists())
    {
        f.mkdir();

    }
    f.setWritable(true);
    f.setExecutable(true);
String filePath = fileExportPath + File.separator;

         try {
             String Content="";
             Content+="\"Title\",\"Description\",\"DueDate\",\"AssignedTo\"\n";

             byte buf[] = Content.getBytes(); 
             OutputStream fileOut = new FileOutputStream(filePath);
             fileOut.write(buf);
             fileOut.close();
            }

OutputStream fileOut = new FileOutputStream(filePath); im getting error in this line

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:40:43+00:00Added an answer on May 20, 2026 at 6:40 am

    The “filePath” is a directory name.

    String filePath = fileExportPath + File.separator;
    

    It is necessary to add the file name to “filePath”.

    String filePath = fileExportPath + File.separator + "fileName";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my code: File TempFiles = new File(Tempfilepath); if (TempFiles.exists()) { String[] child
File file = new File(file-type-string-i-want-2000-01-01-01-01-01.conf.gz); Matcher matcher = pattern.compile(\\-(.*)\\-\\d{4})).matcher(fileName); StringBuilder sb = new StringBuilder();
I try to create a new file inside a JSP and try to save
I'm developing a perl script. This is my input string in a file new.txt
When I try to do this ( real code ): fh = File.new(a file
In VS2008, I go to File/New/Project, select ASP.NET Web Application and create a new
I added a new file F1 and made changes to another file F2 but
I just did File -> New Project last night on a new project. Ah,
PhoneGap - How to create a new file in assets/www/example/hallo.text my error is Error
Im trying to create new file on D: drive with c/c++ I found this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.