Need to create a "Hot Folder" to automatically copy new files

Soldato
Joined
4 Apr 2004
Posts
5,625
Location
Pontypridd
This will be run on a local windows 10 machine, essentially all I need is when a new file is created in a selected folder, that file is automatically copied to another folder.

The use for this is for a new RIP we are using, with our old RIP we could drop a list of files into it and it would add them to the RIP in file order. However the new RIP seems to take them at random (And there's no way of stopping this). This creates a big slow down when trimming and sorting the media for shipping.

As the files are created every 15-90 seconds, it gives enough time for the RIP to load them into the list in the correct order.

Any help welcome
 
Soldato
OP
Joined
4 Apr 2004
Posts
5,625
Location
Pontypridd
Sort of, though that's moving the files, I guess I could just take the /MOV command out and it would just copy new and updated files?
 
Soldato
OP
Joined
4 Apr 2004
Posts
5,625
Location
Pontypridd
The copy seems to work, my only other problem is I want it to only copy new files from the time of monitoring.

For example : I want run robocopy on c:\test1 and copy any new files to c:\test2, with the current command above it copies all current files in the folder and then starts monitoring, is there a way for it to scan the files first, not copy them, then only start copying new / edited files?
 
Soldato
OP
Joined
4 Apr 2004
Posts
5,625
Location
Pontypridd
You could add /MAXAGE:1 which would only copy those from today, or replace the 1 with today's date
or /M those with an Archive bit set (any modified file) and then re-set it once copied

This works but I've come across another problem that may result in robocopy not working, due to the workflow that I use, the destination folder for the copied files is actually the RIPs own hot folder, unfortunately the RIP processes then deletes each file, so with the above command it's getting a copy of each new file created added to the rip each minute (meaning many duplicates)

Microsoft Synctoy?

I did have a look and the main issue is the the sync file it leaves in the destination folder gets spat out by the RIP
 
Soldato
OP
Joined
4 Apr 2004
Posts
5,625
Location
Pontypridd
What about Powershell? You can use a FileSystemWatcher to monitor a folder and be notified instantly of any changes. In the notification you can move / rename / do whatever you want with the file.
https://community.idera.com/databas...osts/using-filesystemwatcher-correctly-part-2

Thanks, I'll have a quick look this morning, not really done anything like this in the past but I'm willing to give it a go, hopefully I can get it going and it can save me a lot of time in the long run
 
Soldato
OP
Joined
4 Apr 2004
Posts
5,625
Location
Pontypridd
Wow Pho, thanks for that, it's all up and running, the only thing is it seems to be moving the new files and not copying them. I did try to change line #23 to a copy command, but it threw up an error.

Is this something easily fixed?
 
Soldato
OP
Joined
4 Apr 2004
Posts
5,625
Location
Pontypridd
Works like a charm, thanks so much. Not sure I can offer any services in return, but I do work in Printing so if there's anything you might need just send me a trust.

Thanks again
 
Soldato
OP
Joined
4 Apr 2004
Posts
5,625
Location
Pontypridd
I've just saved the execution line as a bat file and will run it when I'm designing.

On the bank note side of things, it is something we can do with our Textronics wax printer, but it's all out of red wax for some reason which has nothing to do with the big stack of fifties in the corner! :p
 
Back
Top Bottom