xp and batch files

F

Food Groupy

hello,

i occasionally write a batch file to automate occasional backup of certain
files.

i know windows programs have a "start" folder that you can drag batch files
to, to execute on startup.

Is there such thing as having a batch file executing automatically on
shutdown as well, or would i have to do it manually?


question2 - i'm just learning batch file syntax, when writing a batch file,
do you need to use the 8.3 abbreviation for all files and pathways or does
XP recognize long folder names?

thank you.
 
D

David Candy

Windows commands recognise long file names. As space is a command delimiter, file names that use spaces must be enclosed in quotes. There are also Dos commands in XP. These do not use long file names (but they tend not to use files at all so it's a moot point - see mem command).

Internal commands use long file names unless you are sneaky. This is because anything typed into the Dos 5 command.com (or bat/cmd file) gets passed to the XP command processor cmd.exe for execution. To force Dos 5 to execute you need to specify as a parameter to command.com

Type
command /k dir /?
and
cmd /k dir /?

Remember the long file name is the standard. You can't know for sure what the short file name might be (which is why some MS programs fail on install when it assumes it is creating the filename. But if the user already created a file with that short file name then it's a big problem) and if you copy or move the file it might change short names.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top