Computer Hope

Microsoft => Microsoft DOS => Topic started by: miket11 on January 04, 2019, 01:28:20 PM

Title: creating a script to copy/backup, maybe robocopy?
Post by: miket11 on January 04, 2019, 01:28:20 PM
Hi, guys I tried asking a question before but didn't get much traction on it.

Can someone please help me, I'm just very new to all this and idk were to start.

I need to transfer files between different servers

When I run the script, it could be robocopy, but how much can I customize robocopy to make it do what I want.

so when the script to kind of always be running in the back ground so I do not need to initiate it everytime.

Here is the setup up I have.

I have 2 servers. Server 1 is the source and Server 2 is the destination

On server 1 I have two folders
Folder1_under_review
Folder2_production

On server 2 I have
Folder3_under_review
Folder4_approved
Folder5_production
Folder6_backup

so when I work on my projects and im finished with the project I want to save it to the folder1_under_review, the script needs to be able to look at that folder and move any new files to folder3_under_review. Once the file is in the folder3_under_review someone will look at the file and approve it by moving it to folder4_approved. when the file is in folder4_approved the script needs to take it from the folder4_approved and move it to folder5_production, but as it moves it to the folder5_production it needs to delete that file from folder4_approved also if same file name exists in folder5_production I want the script to backup that other file to folder6_backup.

So when the file that has been moved from folder4_approved is finally in folder5_production I want the script to mirror or synch or copy this folder5_production to folder2_production on server 1. I want folder2_production to always mirror/have exact same files as folder5_production.

Hope this makes sense. I have been looking all over the internet and didn't find a solution with robocopy

Thank you
Title: Re: creating a script to copy/backup, maybe robocopy?
Post by: Squashman on January 05, 2019, 07:30:32 PM
Yes, Robocopy has a monitor option.

But in your case you would have to have multiple Robocopy instances running in monitor mode to do what you want to do.
Title: Re: creating a script to copy/backup, maybe robocopy?
Post by: miket11 on January 10, 2019, 09:39:39 AM
Thank you for providing the monitor option. can anyone help with the actual code of copying all the files, etc? I do not have a script written yet, idk where to start.
Title: Re: creating a script to copy/backup, maybe robocopy?
Post by: Salmon Trout on January 26, 2019, 03:38:13 AM
Quote
can anyone help with the actual code of copying all the files, etc?

Maybe Google for "free script writing service"?