From: Pegasus [MVP] on


"Howard Brazee" <howard(a)brazee.net> wrote in message
news:uocrs5hdnpil0gcof752omo80vhou1suui(a)4ax.com...
> On Tue, 20 Apr 2010 00:20:16 +0200, "Pegasus [MVP]"
> <news(a)microsoft.com> wrote:
>
>>While it is sometimes permissible to omit the space between parameters,
>>doing so is a bad habit and can catch you out, e.g. with robocopy. It is
>>one
>>of my principles to always put at least one space between any two
>>parameters.
>>
>>Having trailing backslashes for folder names is sometimes permissible,
>>required or forbidden. In your case it is forbidden.
>
> I kept looking at syntax, but the rules weren't defined. The
> documentation seemed to think the obvious stuff didn't need to be
> defined. But it wan't obvious to me.

It wasn't obvious to me either - I found out by trial and error.

From: Pegasus [MVP] on


"Howard Brazee" <howard(a)brazee.net> wrote in message
news:9fmrs5tdqmkkhvug75ck27s6m2h0geokn5(a)4ax.com...
> I wonder if someone can tell me what's wrong here:
>
> test.bat =
> ======================================================
> dir c:\belfry\test.bat
> dir e:\Copy\belfry\test.bat
> robocopy "C:\belfry" "E:\Copy\belfry" test.bat /E /XN /FFT
>
> pause
> ======================================================
>

There is nothing wrong with the batch file - it works perfectly on my
machine - but there is something wrong with drive E: on your machine. I
would test things from a Command Prompt like so:

md E:\Copy\Belfry
copy c:\belfry\test.bat e:\copy\Belfry

From: Howard Brazee on
On Tue, 20 Apr 2010 20:13:36 +0200, "Pegasus [MVP]"
<news(a)microsoft.com> wrote:

>There is nothing wrong with the batch file - it works perfectly on my
>machine - but there is something wrong with drive E: on your machine. I
>would test things from a Command Prompt like so:
>
>md E:\Copy\Belfry
>copy c:\belfry\test.bat e:\copy\Belfry

E: is an external Unix drive, but the file exists.

Interesting, I changed the batch file:
Xcopy "C:\belfry\test.bat" "E:\Copy\belfry\*.*"
robocopy "C:\belfry" "E:\Copy\belfry" "test.bat" /E /XN /FFT /R:3

This time the robocopy ran, skipping the copy. I infer that somehow
robocopy doesn't have the access that xcopy does to this drive.

I changed the E: to a Y: and ran robocopy to copy to my iPod, it
worked.




--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
From: Howard Brazee on

>Interesting, I changed the batch file:
>Xcopy "C:\belfry\test.bat" "E:\Copy\belfry\*.*"
>robocopy "C:\belfry" "E:\Copy\belfry" "test.bat" /E /XN /FFT /R:3
>
>This time the robocopy ran, skipping the copy. I infer that somehow
>robocopy doesn't have the access that xcopy does to this drive.
>
>I changed the E: to a Y: and ran robocopy to copy to my iPod, it
>worked.

Now robocopy can create the file, which it couldn't before. It's as
though once it creates the file once, it knows how. I'm puzzled. I
need to trust it to copy new files.

I've been getting weird stuff all day though, with me running batch
jobs that seem to be previous runs, with commands I got rid of. I'm
going to reboot.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison