Remote path watcher/lookup with time interval

322 views Asked by At

I have a below requirement to my java application,

  1. I need to lookup/watch the remote folder or FTP(Example : \192.168.300.55\c$\logs) for particular time interval(Example : 15 Mins)
  2. and i need to compare the local folder(which i have created locally in my application/project path) and remote folder .
  3. If there is any updates in remote folder, I need to update local folder accordingly(need to copy the updated log files to local folder).

Question,

  1. Is there any API/way available to do this operation in java.

  2. Can we do this operation with windows script(.bat).

Please let me know your thoughts on this.. i am trying to get good performance and reduce the time.

Thanks,

1

There are 1 answers

1
Alex On

In Java you can simply read this location every 15 minutes and compare results to the previous ones. But since you want to run it via bat file in Windows why not use native Windows solution? Filewatcher for example.