This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Detect new file in a directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Detect new file in a directory" Watch "Detect new file in a directory" New topic

Detect new file in a directory

Roy Cantos
Ranch Hand

Joined: Feb 22, 2002
Posts: 38
Hi Guys,
Is there a way that java can detect a new file, or existing API that we can use.

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
The way I do this, is to start a thread that runs over all files in the folder from time to time.
This way you can track which files were deleted and which ones are new.
Hope this helps.
GeeCON Prague 2014
subject: Detect new file in a directory