This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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

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
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

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 API description.

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24168

Did you look at the "exists()" method in the class?

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