I have a folder on my windows 7 pc, that once a file was copied successful to my folder - I would like to invoke ant script/call java code that will accept the file name and location.
How can I do it?
In Windows 7, there is a built-in Task Scheduler . You could write a Java class (or Ant script) that would execute every 5 minutes, for example, check the files on that folder and perform an action on any file in it.
Of course, this implies a certain delay in processing the file; and if you reduce the delay, then you will likely have to control concurrent access if two instances of the job end up overlapping, but it could be a start.
Also see: Run script on Windows every n minutes