I think the others have provided some good input.
My 2 cents:
1. PowerShell can help automate the batch file creating if there's some kind
of pattern that can be followed. You might need to detail a bit more of
what the full commands needs to look like.
2. As for monitoring, assuming the commands are meant to be synchronous,
then it would be a simple matter of using some logic between each command to
increment the number of commands completed.
Are you restricted to using PowerShell v1? If you need to run these jobs
asynchronously, then you can run each robocopy command in a background job.
BITS is definitely an option here, and your scenario would be a good test.
Very long running background jobs would also be a good test for PowerShell.
If you can provide more details, maybe we can provide more guidance.
"Gary" <Gary@xxxxxx> wrote in message
> I routinely copy a lot of files between different servers via robocopy,
> and I
> was wondering if there is a better way to create and monitor the copy
> What I currently do is manually create a batch file (see example below),
> then run it in the console session of the server via RDP.
> This lets me logon periodically and check how the copies are going.
> (We're talking an average of 50-100 CMD windows and terabytes of files, so
> it takes quite a while)
> Is there an easy way to:
> 1. Automate building the batch file or creating an equivalent?
> (The robocopy needs to run from the destination server, in a session
> that is not affected by anyone logging onto the server, and there can be
> than 100 shares that need to be copied, but I try to limit the number of
> concurrent sessions to 100 or less for performance)
> 2. Monitor the progress of the operation?
> (Overall percentage complete would be great, but even seeing something
> like "23 of 84 sessions complete" would be helpful.)
> start cmd.exe /c robocopy \\server1\$drivename\sharename\sharename1
> drivename\sharename\sharename1 <lots of robocopy parameters go here>
> start cmd.exe /c robocopy \\server1\$drivename\sharename\sharename2
> drivename\sharename\sharename2 <lots of robocopy parameters go here>