SUMMARY: Quick directory change using abbreviated names
EXAMPLE:
CCD \wi sy
To get to \windows\system. NOTE - NOT \wi\sy.
CCD attempts to find a unique match for each item in the path you provide, using the characters at the start of the name. If it does not find a match it will tell you. If there is more than one possible match it will take the first one it finds. Failing a match, before giving up it tries to find a match away from the beginning of the available names. Take this example:
CCD 8
If no directory name began with '8', but one was called PROJECT8, then CCD would choose that as its match.
One further feature: CCD by itself changes back to the directory you last used it to escape from. The previous directory information is stored in c:\ccd.txt.
CCD does not recognise long filenames - base your abbreviations on the short filenames instead.
SUMMARY: Execute parts of AUTOEXEC.BAT once per day, or once on a certain day of the week.
Use Checkday with one of the following parameters: MON TUE WED THU FRI SAT SUN ANY
EXAMPLE:
CHECKDAY MON
If today is Monday, and CHECKDAY MON hasn't already been executed today, then ERRORLEVEL will be 0. Otherwise ERRORLEVEL is 1, or -1 if an error occurred. ANY matches any day of the week, so you can run something once per day.
In the following sample, various messages are displayed with ECHO commands once every Friday, once very Tuesday, once per day, and on every execution.
SUMMARY: Use in batch files to get a string from the keyboard and place the result in an environment variable.
EXAMPLE:
USERINPT TESTVAR
to get user keyboard input into TESTVAR. Maximum string length is 255 characters. WARNING! It is up to you to ensure that the environment has been set to a sufficient size to accommodate this amount of extra information!
A secondary use for USERINPT is to pipe the output from another program into an environment variable, for example:
ECHO. | DATE | FIND "Current" | USERINPT TEST
SET
Try it see to what happens. Not in itself very useful, but there are occasions when this facility is valuable. For example, it is becomes easy to build a batch file which can set an environment variable to indicate the version of DOS or Win9x being run, and whether or not the batch file is being run inside a DOS box.