Tag: dos

  • Find a string and copy its whole line to new file

    The other day I got a zip archive of a hundred xml files. The task was to identify a single key word/phrase (STR_RESTORING_FILE_FAILED) in each xml file that indicated a failure to restore a file (part of a larger job) and create a new file with just line in each xml file that matched the…

  • Delete EFI partition in Windows 7

    So I bought myself an external 1TB USB hard drive the other day. The idea was to use it for backups on my MacBook, but later I decided to use it on a PC instead. Since I had initially formatted the drive in OS X, the Windows disk management tool listed an EFI partition on…

  • Das DOS to the rescue

    Lets say you’ve got a folder with a bunch of files and subfolders…each subfolder in turn contains a bunch more files of which you are only interested in one with a specific name. You could perform a search in the root folder and quickly find all the files with that name. Copying them from that…

  • Wait a sec, Mr batch file!

    Today I sifted through the first 4 pages of Google search results on ‘pause batch file’ only to find that none of the suggestions work on Windows 2008 server. Why are all of these pages suggesting sleep.exe and choice.com and ping -n when the obvious solution is the timeout command? More importantly why is it…