<skinnke[ at ]rogers.com> wrote in message news:1182176403.939308.132730[ at ]q75g2000hsh.googlegroups.com...
[Quoted Text] > This script works on Windows 2000 but seems to have an issue with > 2003 > as I get a 'system cannot find the file specified" message. This is > running in batch and we skip the most recent file so it doesn't try > to > move the sysout file of the job that was actually doing the move and > thus incur a sharing violation. Any help would be great. > > for /F "skip=1" %A in ('dir \\mlisdistfsp\C$\Program Files\BMC > Software > \CONTROL-M Agent\Default\SYSOUT /o-d /a-d /b') do move \\mlisdistfsp\C > $ > \Program Files\BMC Software\CONTROL-M Agent\Default\SYSOUT\%A \ > \mlisdistfsp\C$\Program Files\BMC Software\CONTROL-M Agent\Default > \SYSOUT\Backup-1
I would think you might need to quote the paths:
> for /F "skip=1" %A in ('dir "\\mlisdistfsp\C$\Program Files\BMC > Software > \CONTROL-M Agent\Default\SYSOUT" /o-d /a-d /b') do move "\\mlisdistfsp\C > $ > \Program Files\BMC Software\CONTROL-M Agent\Default\SYSOUT\%A" "\ > \mlisdistfsp\C$\Program Files\BMC Software\CONTROL-M Agent\Default > \SYSOUT\Backup-1"
/Al
|