File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes writing path in a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "writing path in a file" Watch "writing path in a file" New topic

writing path in a file

Martin Kogut

Joined: Apr 20, 2004
Posts: 7
Hello, I 've made a tree with showing all my folders, by clicking two times, my script is writing the selected path into a seperated txt-file! but if click another direcotory or file, it will be overwritten in the txt-file, how can i do that so, taht the tree will sort my clicked paths & directories`?
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

Open the file in 'append' mode. I guess Javadoc:File is the right place for the details and I/O would have been the right forum, since the file isn't affected by your GUI.
Martin Kogut

Joined: Apr 20, 2004
Posts: 7
Ich danke Dir, hat mich viel weitergebracht!
I agree. Here's the link:
subject: writing path in a file
It's not a secret anymore!