Java File manipulation

Posted by user69514 on Stack Overflow See other posts from Stack Overflow or by user69514
Published on 2010-03-11T18:37:04Z Indexed on 2010/03/11 18:39 UTC
Read the original article Hit count: 202

Filed under:
|
|

So I have an application with a JFileChooser from which I select a file to read. Then I change some words and write a new file. The problem that I am having is that when I write the new file it's saved in the project directory. How do I save it in the same directory as the file that I chose using the JFileChooser. Note: I don't want to use the JFileChooser to choose the location. I just need to save the file in the same directory as the original file that I read.

© Stack Overflow or respective owner

Related posts about java

Related posts about file-manipulation

  • Java File manipulation

    as seen on Stack Overflow - Search for 'Stack Overflow'
    So I have an application with a JFileChooser from which I select a file to read. Then I change some words and write a new file. The problem that I am having is that when I write the new file it's saved in the project directory. How do I save it in the same directory as the file that I chose using… >>> More

  • R or Python for file manipulation

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I have 4 reasonably complex r scripts that are used to manipulate csv and xml files. These were created by another department where they work exclusively in r. My understanding is that while r is very fast when dealing with data, it's not really optimised for file manipulation. Can I expect to… >>> More

  • Script Task - File Manipulation

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Using Script Task, I have written a code to create a folder and create a file of msword document inside the created folder. Its working in local machine. But its not working in another server, after I deployed it. The folder is created successfully, but the word document file is not created. for word… >>> More

  • python file manipulation

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I have a directory /tmp/dir with two types of file names /tmp/dir/abc-something-server.log /tmp/dir/xyz-something-server.log .. .. and /tmp/dir/something-client.log I need append a few lines (these lines are constant) to files end with "client.log" line 1 line… >>> More

  • C++ File manipulation problem

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I am trying to open a file which normally has content, for the purpose of testing i will like to initialize the program without the files being available/existing so then the program should create empty ones, but am having issues implementing it. This is my code originally void loadFiles() { fstream… >>> More