wood burning stoves 2.0*
The moose likes Java in General and the fly likes checking for file present in the directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "checking for file present in the directory" Watch "checking for file present in the directory" New topic
Author

checking for file present in the directory

Satyajeet Kadam
Ranch Hand

Joined: Oct 19, 2006
Posts: 215
Searching for the file in directory

There are 2 directories
1)D:\eclipse\POST_5227\gui\Trustdata
In this directory there are ".t05" files (ex Quick.t05)

After extracting name of the file example "Quick", adding a new extension to it.

example "Quick_printIt_1"

2) Checking this new file present in another directory
D:\eclipse\POST_5227\gui\print


How to check the existence of new file present in print folder?



pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
check out the java.io.File API description.

pascal
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Did you look at the "exists()" method in the java.io.File class?


[Jess in Action][AskingGoodQuestions]
 
 
subject: checking for file present in the directory
 
Similar Threads
Picking With Java 3D
downloding file prolem(dialog box not coming)
Java program that changes a file's extension
Appending Date and TimeStamp to the File name
how to solve this type of stackoverflowerror...