|
Answer» How can I rename a file to the HOST name of the PC?
Example: I have file CALLED backup.cab in location C:\share.
the hostname of the PC is "mypc1".
I want to rename backup.cab to mypc1.cab.
I dont want to use "Ren bakup.cab mypc1.cab" because for around 600 PCs it needs to be done.. so If I use the above command, then the batch file needs to be EDITED for all the 600 PCs. If we take automatically the file name as the hostname of the PC, then the single patch file can be used in all the 600 PCs.
Please help....
SURESH....Use
Code: [Select]c:\share\%%computername%%.cab in your batch file to access the file from the local computer.
|