batch file question

  • Thread starter Thread starter Support
  • Start date Start date
S

Support

Hi, I have a file on my w2k pdc that I wish to copy down to a certain
directory on some w98 clients I have using the login script.
I have copied the file to: \\pdc\netlogon
In the relevant login script I have added:
copy ino.sam c:\progra~1\ca\etrust~1\
however when I ran the login script I had an error 'invalid directory' and
'file not found' error. I have checked the directory names and have also
opened a dos prompt and done a:
'cd c:\progra~1\ca\etrust~1\' which resloves correctly
I then added the netlogon share to the command:
copy \\pdc\netlogon ino.sam c:\progra~1\ca\etrust~1\
this came back with: 'too many parameters' and again, file not found

Where am I going wrong? This is so basic that it's embarrasing :0)
thanks
 
The emberassing thing would be to not know to ask for help!

A tip would be to add %0\..\ to your source path
copy %0\..\ino.sam c:\progra~1\ca\etrust~1\

%0 = the command that started your script. The \..\ takes
the copy command to the DIRECTORY of your script.

If you are OK with coding your server name into the script
your second attempt was close - you only need to add a
backslash;
copy \\pdc\netlogon ino.sam c:\progra~1\ca\etrust~1\
should be
copy \\pdc\netlogon\ino.sam c:\progra~1\ca\etrust~1\

The downside of the second option is that this will copy
from the PDC / named DC even if you have BDC's or DC's
around the world that have a replicated copy of the
netlogon directory.

Go for option 1 first, this will work even with more DC's
added..

Best regards,
Tor
-----Original Message-----
Hi, I have a file on my w2k pdc that I wish to copy down to a certain
directory on some w98 clients I have using the login
script.
 
Thanks Tor - can't believe I missed the backslash...!
Guess that's what comes with only 3 hours sleep!!
I'll give the 1st method a try as that looks neater
 
Back
Top