Asked by:
Need help with a data copy script

Question
-
Hi everyone,
I am looking for a way to script a job to meet the following needs:
I am copying the contents of "Folder A" to "Folder B".
If "Folder B" already contains an existing filename that has a newer modified date than the same file in "Folder A", go ahead and copy the older file from "Folder A", and append the copied filename with the modified date of the older file.
If "Folder B" already contains a file that has an older modified date, append the older file with the modified date, and copy the newer file from "Folder A" as is.
Thanks,
Nick
Nick Cozby
- Edited by NickCozby Friday, August 17, 2018 3:24 PM
- Moved by Bill_Stewart Wednesday, December 12, 2018 6:11 PM This is not "scripts on demand"
Friday, August 17, 2018 3:23 PM
All replies
-
We don't supply scripts on request.
To copy folders use RoboCopy.
RoboCopy /?
Post basic user questions to the Windows General forum.
\_(ツ)_/
Friday, August 17, 2018 4:20 PM -
Hi JRV,
I'm aware that this forum isn't going to "supply a script on request". However, I am looking for input on ideas on ways to do accomplish my task. I am well aware of Robocopy, however none of Robocopy's innate abilities appear to be able to meet the requirements. If I am incorrect, please correct me, Perhaps lets not be so terse towards posters looking for help, eh?
Nick Cozby
- Edited by NickCozby Friday, August 17, 2018 4:36 PM
Friday, August 17, 2018 4:32 PM -
RC can do most of what you seem to be asking. The issue of appending files makes no technical sense as you wil get a file with multiple copies of the file inside of it.
This forum is not a free consulting forum. It is for technicians who are trained in Windows and assumes you know how to write aa script. Ask a question about your script and we will be glad to help.
Please carefully review the following links to set your expectation for posting in technical forums.
This Forum is for Scripting Questions Rather than script requests
- Script Gallery.
- Script Center
- Script requests
- Posting guidelines
- Handy tips for posting to this forum
- How to ask questions in a technical forum
- Rubber duck problem solving
- How to write a bad forum post
- Help Vampires: A Spotter's Guide
- This forum is for scripting questions rather than script requests
\_(ツ)_/
Friday, August 17, 2018 4:47 PM -
Please delete my thread from this forum.
Nick Cozby
Friday, August 17, 2018 5:22 PM -
Please take time to read your initial request. It doesn't make much sense no matter how I read it. You want to append a file with a date. What do you mean by that? You also wan to copy the newer file. This will overwrite the older file which will just throw away your first request.
Try rethinking this request and, perhaps, posting a clearer statement about what you want to do.
\_(ツ)_/
Friday, August 17, 2018 5:28 PM