Archive for July, 2009

How to quickly replace the file extensions of several files

It may be necessary to rename several files to allow compatibility with another program. A good example where this could be used is renaming an ASP file to an HTM or HTML file.
Use the below command at the MS-DOS prompt or within [...]

How to run a batch file each time the computer boots

Create a shortcut to the batch file.
Once the shortcut has been created right-click the file and select Cut.
Click Start, Programs, right-click the Startup folder and click Open
Once the Startup folder has been opened click Edit and paste the shortcut into the startup. Any shortcuts in the startup folder will automatically start [...]

Change the executable path of the Wisdom Service in 3 simple steps

Change the executable path of the Wisdom Service in 3 simple steps:
Start Menu -> Run and enter “Regedit” (sans quotes)

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Wisdom
Change the ImagePath key – double click and set the correct path

How to exit a Windows MS-DOS window through a batch file

When a batch file is complete, Microsoft Windows will leave the Window open, requiring the user of the computer to manually close it. For convenience, the individual [...]

How to create a blank line in a batch file

It may be necessary to create a blank line to help separate text from other text or move text further down the screen.
To create a line add a dot or period [...]

How to execute commands in a batch file in timed intervals

In the below example, the batch file is placed into a loop  and executes the “dir” command every 20 seconds. This solution would be best for users who need to execute a command frequently.
:START
REM Execute the MS-DOS dir command ever 20 seconds.
dir
SLEEP 20
GOTO END
Note: In order for the above batch file to run properly you [...]

Prevent deleting files in MS-DOS without a prompt

To help prevent files from becoming accidentally deleted Microsoft will warn you before deleting files or folders.
By default Microsoft Windows will not prompt a user [...]

How to make a time log in a batch file

The below example demonstrates how to create a time log of when the batch file is loaded, or for example, this could be used in the autoexec.bat when someone logs into a computer that supports this file.
ECHO. |TIME > TIME
COPY LOG +TIME

An alternate, slightly more complicated method that, to our knowledge, cannot be used in [...]

Creating a batch file delay

Below is an example of how to delay a batch file any where from 5 to 99 seconds. In the below example we illustrate a 5 second delay.
TYPE NUL | CHOICE.COM /N /CY /TY,5 >NUL

How to start Windows files and other programs from a batch file

To run Microsoft Windows programs or files use the START command. The below example would run Windows Notepad.
START /MAX NOTEPAD
You can also specify the direct location of the file by typing the below command.
START /MAX C:\Windows\NOTEPAD.EXE
*Windows users who have a different directory (e.g. Windows 2000 users) would need to substitute WINNT or the name of [...]