File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes I/O and Streams and the fly likes java io Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "java io" Watch "java io" New topic
Author

java io

Mandar Tambe
Greenhorn

Joined: Oct 06, 2001
Posts: 1
How to get a filepath of a file stored anywhere in the system?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9043
    
  10
File file = new File( "filename" );
file.getAbsolutePath();

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
prasad bhn
Greenhorn

Joined: May 04, 2001
Posts: 28
you can also get the paths using
getPath()
getCanonicalPath() of File Class...
Originally posted by Mandar Tambe:
How to get a filepath of a file stored anywhere in the system?


prasad bhuvanam
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java io