Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: Move script works in 2000 but not 2003

HTVi
TV Discussion Newsgroups

Move script works in 2000 but not 2003
skinnke[ at ]rogers.com 6/18/2007 2:20:03 PM
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

Re: Move script works in 2000 but not 2003
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 6/19/2007 12:14:46 AM

<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


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen