~~~
From what I gather, UNI, the reason your AutoIt program cannot be repeated to provide subsequent maintenance to the destination folder is because it would copy in new files from the source as well as update the destination files but only updating the destination files is required? If so, I’m contemplating Robocopy’s /XL switch.
Correct - if "
new" = changed.
Not correct - if "
new" = never existed in the destination folder.
The AutoIt script uses a text file that lists a subset of the files in the master folder list. Every file in that text file list will be copied to the destination folder. It would probably be best to
only copy/replace old (existing) files in the destination folder.
The AutoIt script was not written for ongoing maintenance of the destination folders. It prompts the user for three things (list of files to be copied, source folder and destination folder). Even if you hard coded the answers to those three things, you would have to keep the input list and a unique version of the script for each destination folder to be maintained. The script can be changed to not copy a file if the file has not changed, but that is what I was hoping to avoid scripting.
To elaborate further...
Suppose that the "master list folder" contains these files:
1.png
2.png
3.png
4.png
5.png
6.png
7.png
8.png
9.png
goofybt creates a list of those files.
goofybt then uses a spreadsheet to filter out some files.
Then a text file is created that lists the files to be copied.
Suppose that the text file list contains these files:
2.png
7.png
9.png
The AutoIt script uses that filtered text file list to copy those files from the source folder to the desired destination folder. [
goofybt changed the script to always output the files to the same folder and then manually moves them to the desired destination folder.
goofybt also hard coded the source folder. The AutoIt script might still ask the user for the filtered text file list - but that path and file name could be hard coded too.]
I think that
goofybt has multiple destination folders to populate and then maintain (e.g. replace old files).
Destination folder 1:
2.png
7.png
9.png
Destination folder 2:
1.png
4.png
5.png
8.png
Destination folder 3:
3.png
6.png
I had hoped that we could create a maintenance solution that did not involve keeping the original filtered text file list for each destination folder. If I were to create a solution in AutoIt for the ongoing maintenance of these folders, I would try for a script that did not require any future editing:
AutoIt knows the folder that the script is running from. If the maintenance script is placed in destination folder 1 and run from there, the script can enumerate the files in that folder, and copy newer/changed files from the source folder. The same script can be placed in destination folder 2 and run from there. Nothing would have to be edited in the script to make it work in each destination folder.
However, no one is going to want to manually run each script in each destination folder each work day. You would want to use an automated scheduling system. A Windows scheduled task could be used to run one main batch file. That one batch file could start each script. As new destination folders are added, new lines are added to that one batch file.
That said, if all of the destination folders are under one top level folder, then there is no need to put a script or batch file inside every single destination folder. One single script or batch file using recursive searching should handle the task. It just depends on how the data is setup.
Robocopy's /XL switch seems to be like xcopy's /D switch.
Does Robocopy have a switch like xcopy's /U?
Also, I have no idea how many files we are talking about in these destination folders. Robocopy's file enumeration performance might be an issue. See the second post in
this thread.