Tag: bat

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 »

Use DOS Batch to show last month date with the date command

Use a DOS script to automate a process where by using the date /T command would return the previous month, rather than the current month. This actually sounds easier than it is. For the desired results, a couple of conditions were considered. Firstly, if in the month of January or one, then the subtracted value of one minus one equals…

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 »