Reputation: 2098
I am writing Java code to generate .dat and .idx files, which I can do. The files are saved to my workspace folder which I set up as a default when I started Eclipse.
Now I want to save these files and only these files I create to another directory on my server. Is there code that can do this or do I have to change the settings in Eclipse to do this?
Upvotes: 0
Views: 684
Reputation: 443
No you can definitely do it programmatically. When specifying the path use something like:
"/c/users/someperson/desktop/blah.dat"
Upvotes: 2
Reputation: 8261
Its a easy thing. Check below if this is what you want. Use
File file = new File("C:\\results\\results.txt");
C:\results\ is your outside directory.
Upvotes: 2