• Post Reply Bookmark Topic Watch Topic
  • New Topic

Poll a directory using WatchService and move files to a database  RSS feed

 
Kyle Jones
Ranch Hand
Posts: 46
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Currently I have a watchservice polling a directory and when new csv files land in the directory I am getting a list of file names that are dropped in.

How can I process each file that drops into the watched directory to that I copy the csv to a database?

Thanks

ps Also, i have entity classes etc set up for the csv file in database.
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what is being asked here. If you know the directory, have access to it and know the filenames inside it then just read the files and upload them.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!