Created
April 22, 2015 20:10
-
-
Save Wildcarde/2147d180620a8ae026e1 to your computer and use it in GitHub Desktop.
A basic robocopy command that can be scheduled via Windows Event Scheduler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM SERVICEUNC is the name of the server you wish to connect to | |
REM Replace password with the service account password | |
REM Replace domain with site domain name | |
net use Z: \\<SERVERUNC>\<LAB\TARGET> <PASSWORD> /USER:<DOMAIN>\<ServiceAccount> | |
REM this is the robocopy location for windows XP installed via 'windows resource kits', the location will | |
REM be different for Vista/7/8 as robocopy is included as part of the OS packages. | |
"C:\Program Files\Windows Resource Kits\Tools\robocopy.exe" E:/ Z:/Raw/ /LOG+:Z:/Logs/transfer.log /E /Z /B /TS /NP | |
REM Remove the previously mounted link so it doesn't leave trailing links or open connections | |
net use * /delete /y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment