Skip to content

Instantly share code, notes, and snippets.

@sebastianneubert
Last active August 29, 2015 14:20
Show Gist options
  • Save sebastianneubert/fe4235524c42901eb431 to your computer and use it in GitHub Desktop.
Save sebastianneubert/fe4235524c42901eb431 to your computer and use it in GitHub Desktop.
win_batch.md

Save hosts file and overwrite it with a given file

xcopy C:\Windows\System32\drivers\etc\hosts C:\Users\USERNAME\Documents\hosts_backup /i /y
xcopy C:\Users\USERNAME\Documents\hosts C:\Windows\System32\drivers\etc\hosts /i /y
ipconfig /flushdns

Mount a network directory over Samba

IF NOT EXIST z: net use z: \\ela-webdev.local\web-app password /USER:USERNAME /PERSISTENT:NO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment