copying via a script

  • Thread starter Thread starter HMS Surprise
  • Start date Start date
H

HMS Surprise

Greetings and apologies for this is more a DOS question.

In a cmd window I may execute
copy e:\temp\lmhosts C:\WINDOWS\system32\drivers\etc\lmhosts

to setup a new PC which has no lmhosts file just lmlosts.sam.

If I put that string into a file named e:\temp\cplmhosts.bat and
execute it a cmd window flashes by but no file is copied. Should this
work?

thanx,

jh
 
HMS Surprise said:
Greetings and apologies for this is more a DOS question.

In a cmd window I may execute
copy e:\temp\lmhosts C:\WINDOWS\system32\drivers\etc\lmhosts

to setup a new PC which has no lmhosts file just lmlosts.sam.

If I put that string into a file named e:\temp\cplmhosts.bat and
execute it a cmd window flashes by but no file is copied. Should this
work?

thanx,

jh

Put the word

pause

as the last line of the batch file, and you'll see the error. Remove it when
done.
[/QUOTE]
 
Try running this from a cmd prompt. If you type it into the run bar,
it will bring up cmd, run what it has to run, and then close. You
should be able to watch progress if you run the same command while in
a cmd window, and view everything that happened (error messages,
complete messages, etc.)
 
Thanks for your answer on this Jon, I did not know you could do this.
(You helped a non OP)
 
Mr Duh strikes again. One PC, the one I was using was different.
Dongle was f: instead of e:

Thanks for the insights tho.

Gotta get off this decongestant, makes me more dumberer that usual.

jh
 
Put the word

pause

as the last line of the batch file, and you'll see the error. Remove it when
done.
Thanks again.

Actually I left it in as the next to last thing last thing was a dir
for visual inspection. After reviewing the results I let it go.


jh
 
Thanks again.

Actually I left it in as the next to last thing last thing was a dir
for visual inspection. After reviewing the results I let it go.


jh



yw.. glad you sorted it anyhow.
[/QUOTE]
 
Back
Top