This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: writing path in a file
It's not a secret anymore!