• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

Robocopy Copy Script

Hi Guys,

I need some assistance with the preparation of a Robocopy script.

The requirement is to only copy the Files/Folders for the current week from the Source to Destination and thereafter the Robocopy should only copy new files only.

Please advise.


Thanks guys
0
japitsolution
Asked:
japitsolution
  • 2
1 Solution
 
japitsolutionAuthor Commented:
To add to above I need the data to be copied across from 4 Servers to a central server.

Example:

Source Files are at C:\Data on Server 1, Server 2, Server 3 & Server 4

Destination folder is at: \\Server5\e$\data


It would be handy to make 1 script with all above servers.

Thanks Guys
0
 
chakkoCommented:
robocopy \\server1\c$\data \\server5\e$\data\server1 *.* /e /m
robocopy \\server2\c$\data \\server5\e$\data\server2 *.* /e /m
robocopy \\server3\c$\data \\server5\e$\data\server3 *.* /e /m
robocopy \\server4\c$\data \\server5\e$\data\server4 *.* /e /m

/e = copy sudfolders also
/m = copy only files with Archive attribute set, then remove/reset attribute (this will only copy new/modified files)
you can add other switches if you like, but that should be the basic command
0
 
chakkoCommented:
the first copy you probably don't want the /m switch, afterwards add the /m switch
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now