Use hostname as part of a copied file

  • Thread starter Thread starter spburke
  • Start date Start date
S

spburke

I have a nslogfile.txt on our windows 2000 servers under
(c:\diags) I would like to create a batch file that would
copy that file to the A: drive with a new name consisting
of the hostname-nslogfile.txt. Is this possible? Thank
you. -scott
 
spburke said:
I have a nslogfile.txt on our windows 2000 servers under
(c:\diags) I would like to create a batch file that would
copy that file to the A: drive with a new name consisting
of the hostname-nslogfile.txt. Is this possible? Thank
you. -scott

copy c:\diags\nslogfile.txt a:\%ComputerName%-nslogfile.txt
 
Back
Top