File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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.

Thanks,
Roy
Anonymous
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.
Regards,
G´┐Żnther.
http://www.javacoding.net
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Detect new file in a directory