Sometimes it would be helpful to create your own commands in windows. You can do this using the command or DOS prompt. You can start the command prompt by going to start run and type “cmd”.
You can use the edit command at the command prompt or use an editor like notepad.
A simple script to do some maintenance on your D: drive will serve as an example:
Maintenance.bat
rem Batch file to do maintenance on d drive
rem Make sure we start on c: drive
echo “Starting drive maintence on the D drive”
echo “Changing to the C drive”
c:
rem Run chkdsk on the d drive
echo “Running chkdsk on the D drive”
chkdsk /f /r /x d:
rem Defrag the d drive
echo “Defragging the D drive”
defrag d: -f -v
echo “D drive maintenance complete”
exit
The rem statement is a remark. This allows you to put comments in your batch file.
The echo statement prints to the screen. This allows you to follow the progress of your script.
the chkdsk runs check disk on drive D
the defrag defrags drive D
the exit statement exits the script.
You can get help on each command by type “help command”. To get a list of available commands type “help” by it self.
You can then put the script as a scheduled task to run on a regular basis.
For MyPTSMail users support is free.
For more information or tech support by phone on the command prompt call 410-838-5100 or email us experts@expertsinunix.com.
Skype: solution1000