The ‘Batch file programming’ Archives
Posted December 7, 2006 by

XP batch files: Create variable for current user account and find current user

this is a quick batch file recipe that is more of an appetizer than a full meal. this recipe is just a quick batch file that lets you find the user who is currently logged in when the batch file is ran by using a FOR statement and the %USERPROFILE% variable in XP.

Posted April 8, 2006 by

Batch File Converting of Video Files: SageTV Example

I used to run SageTV as my PVR front-end but have later decided to switch to MCE2005 due to its cleanness and integration into XP. Anyway, in that time, I found a For statement batch file I used to create my own script to auto-encode video. After playing with For statements for quite some time, […]

Posted November 21, 2005 by

Date Calculation in Batch Files XP/2000

The following tutorial describes using a batch file to calculate the date in both English and American formats.

Posted August 29, 2004 by

Using Variables in Windows Batch Files

Regardless of the scripting language, the use of variables can greatly enhance the functionality of a script. This tech-recipe demonstrates basic use of variables in MS-DOS or Windows batch files.

Posted February 5, 2004 by

Processing the contents of a text file using FOR loop

As admins, we often have to take actions against a list of things (computers, servers, file shares, etc). One great way to approach this is to put the list in a test file and use a FOR command to loop through the file and take a action against the contents.

Posted December 6, 2003 by

Supress Responses From Commands In Batch Files

This quick recipe describes how to supress responses to commands within batch files.

Posted December 6, 2003 by

Supressing Prompts In Batch Files While Deleting All Files

Successful batch files cannot be slowed down with a bunch of user prompts. This little tech-recipe will show you how to supress prompts in batch files.

Posted November 28, 2003 by

Create Batch File to Start or End Window Services

The windows environment can be easily changed by starting or ending various windows services. For example, this method can be used to easily shut down multiple services for a performance boost during game playing.