Link to home
Start Free TrialLog in
Avatar of bobgraf
bobgrafFlag for United States of America

asked on

Automate File Copy Tasks

Good Afternoon,

Specifics:
Windows Server 2008 R2 Enterprise
Service Pack 1
Disk E: (NTFS, Primary Partition)

Problem Details and Description:
FolderA
FolderB
FolderC

New PDF and DWF files created in FolderA should be copied to FolderB (REAL TIME - same file structure)
If the file already exists in FolderB (existing files will be edited in FolderA) it should be renamed, and moved to FolderC (FILE RENAMED REAL TIME, OLD FILES MOVED periodically - same file structure.)  All older versions of files should be in FolderC, most current versions of files should remain in FolderB.
E.G. FolderB contains file.pdf, FolderC contains file.old1, file.old2, etc. (depending on revisions to original file.)
Does anybody have suggestions on how to accomplish this?  Are there 3rd party tools out there?  I can provide more details if necessary.

Thank you in advance,
BG
Avatar of NVIT
NVIT
Flag of United States of America image

For a given file, how many versions exist in FolderC?
Avatar of bobgraf

ASKER

It would depend on the number of revisions to the original file, this project is in it's infancy.  If the number of files needs to be kept to a certain number, we could limit it at that level.  I doubt it would be more than 10, but if the number were 5, we could make that work.  Thank you
It shouldn't be too difficult to write a command file to do those things then run it as a recurring task say every 5 minutes or so
Syncback Pro will do this (and much more...).  Full featured 30 day free trial available, so you can verify that it will accomplish this.  http://www.2brightsparks.com
A direct approach can use a script and a FileSystemWatcher object to detect changes in real time. The script can do all things you can think of. I can write up a PowerShell script doing that.
But if you can live with the recurring scan using a scheduled task, and there aren't thousands of files to monitor, I would take that road.
I assume all locations allow for direct file access, i.e. no FTP site or the like.
Avatar of bobgraf

ASKER

Sorry for the delay.  All locations are direct file access (no FTP sites, etc.)

I checked with my engineers, on the high end no more than 50 dwf\pdf files per day would copy from FolderA to FolderB.  Although real time is optimum, scanning FolderA and copying new dwf\pdf to FolderB every 5 minutes would work.  But part of that would need to rename the file if it already exists in FolderB.  Then those renamed files would need to more to FolderC (that could be at the end of the day, wouldn't  need to be every 5 minutes.)
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bobgraf

ASKER

We do use subfolders, I used this batch file and it worked like a charm.  My apologies for being late with the response.