Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Detect new file in a directory

 
Roy Cantos
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic