Tag: cmd

Useful DOS Commands

From time to time a DOS batch (“bat” or “cmd”) file needs to be written to perform some task or series of tasks. There are various commands that I seem to consistantly search for on the Internet. Here is a list of some of those useful DOS batch commands. How to delete files equal to zero bytes in size. Delete…

Read More »

Delete Files and Subfolders from Folder but not that Folder Itself

If you would ever want to use a command line delete all the files and folders from within a folder without deleting the folder itself, a batch file can be constructed. Warning: There are a few things that I discovered while testing this script. Firstly, the CD command, which is part of this script will accept a / character as…

Read More »

Compress individual log files into individual compressed archives

There was a task to compress all the log files for a Microsoft IIS6 installation. The log files were taking up gigabytes of space, whereas a single log file may be as large as 50 to 100MB in size.  A compressed log file resulted in only 2-4MB in size. I needed a method that would compress each log file into…

Read More »