I'm trying to write a batch file that sites on our H drive network drive, that will rename the users local hosts file to hosts.old and copy down a new one. I'm getting a path error, so I'm thinking I did something wrong, maybe because of the spaces, or possibly because the hosts file has no extension? I'm horrible at writing batch files, but here's my syntax:
ren C:\Windows\system32\drivers\etc\hosts C:\Windows\system32\drivers\etc\hosts.old
copy H:\Remote Host File\hosts C:\Windows\system32\drivers\etc\hosts
For the sake of this posting, we'll assume I typed the paths in correctly. I want to be able to have my remote users go to our H drive, and run this batch file to replace their file.
ren C:\Windows\system32\drivers\etc\hosts C:\Windows\system32\drivers\etc\hosts.old
copy H:\Remote Host File\hosts C:\Windows\system32\drivers\etc\hosts
For the sake of this posting, we'll assume I typed the paths in correctly. I want to be able to have my remote users go to our H drive, and run this batch file to replace their file.