Sunday 15 August 2010

windows - Way to automate enumerating and inserting subfolders into a command line -



windows - Way to automate enumerating and inserting subfolders into a command line -

using robocopy merge 2 user home directories shares 2 different servers new server, can't utilize /purge mirror deletes because delete other servers stuff.

i need way enumerate folder names users$ share on each server, , add together both path statements in command below, can purge @ users subfolder level.

robocopy command:

robocopy "\currentserver1\users$" "f:\users" /e /b /copy:datsou /r:1 /w:1 /mt /log:"c:\robocopylogs\mirrorusers1.txt"

can batch or vbscript that?

thanks in advance help can provide.

you merge both source folders staging folder, mirror staging folder destination folder:

mkdir c:\staging robocopy \\server1\src c:\staging /e /b ... robocopy \\server2\src c:\staging /e /b ... robocopy c:\staging c:\dst /mir /b ... rmdir /s /q c:\staging

windows batch-file vbscript

No comments:

Post a Comment