Batch Script for RoboCopy

DanielG995

Commendable
Mar 22, 2016
2
0
1,510
Hello all,

Im new in the IT field and my boss has tasked me with creating a Robocopy batch script. The reasoning behind this is we have an XCopy script that allows one of our end users to copy over multiple files into a mapped network drive. The issue is that the script is literally just aimed to dump all the files from the laptop's C:\Recordings folder into the mapped network drive's root where our user then manually moves the copied files into the appropriate directories. What I want to do is create a script that moves the plethora of files and organizes them into the appropriate folders, therefore, providing our end user with a much easier, more efficient way to do the task at hand. What I'd like is some help on laying the ground work for the script because I'm definitely NOT the best script writer. Id like to see how one looks like and then craft it to fit my environment. Plus, any ideas are more than welcome on how I should approach this. I'm thinking about organizing the files by timestamps or find a way to do something such as if a file is new, to replace the old one in the directory it belongs to, or if nothing has changed to ignore it and leave it as is. Any ideas are welcome!

Update: I forgot to mention. These files are recordings..therefore they remain the same and they go into the same directories each time the copying needs to be done. These files do not change names or directories as of yet (more than likely not anytime soon). To clarify if anyone is confused. The files reside on the Laptop's "C:\Recordings" the xcopy script is copying ALL of that into the root of a mapped network drive on one of our servers, unorganized, not in any folders whatsoever. It is my job to find a way to organize these scattered files into the appropriate directories using a Robocopy batch file. I need the new files to go into the appropriate directories. The old files reside on the network drive's root but do not need to be copied into the directories since they've already been copied. Any help would be greatly appreciated!

Thank you.
 
Solution
Take a look at the following website for some tips on using Robocopy to sync files. Obviously you will need to use multiple switches and checks to accomplish what you are attempting to do. Perhaps you would be better making two different scripts. One for the user to use from now on that moves the recordings to new folders and one for the existing files already on the server.

http://burpee.smccme.edu/studenthowtos/robocopy.htm

Puff3r

Distinguished
Apr 17, 2011
398
0
18,960
Take a look at the following website for some tips on using Robocopy to sync files. Obviously you will need to use multiple switches and checks to accomplish what you are attempting to do. Perhaps you would be better making two different scripts. One for the user to use from now on that moves the recordings to new folders and one for the existing files already on the server.

http://burpee.smccme.edu/studenthowtos/robocopy.htm
 
Solution