hougtimo Posted March 9, 2006 Posted March 9, 2006 Hi,What exactly is the difference between BAT and CMD files? As far as I can tell they're about the same.Are they just the same with a different file extension?ThanksHougTimo
Sonic Posted March 9, 2006 Posted March 9, 2006 yes it's just the extension.You can keep .bat to keep compatibility with old-windows (9x).cmd work only on NT 5.x systems (xp/2000)
nmX.Memnoch Posted March 9, 2006 Posted March 9, 2006 BAT files work in the context of command.com.CMD files work in the context of cmd.exe.There are some things you can do within CMD files that take a bit more work to do in a BAT file. For instance, if I wanted to "start" a process and tell the script to wait on it to finish this would be the line to use in a CMD file:START "" /WAIT process_to_start.exeBut to do the same thing in a BAT file you have to do the following:%COMSPEC% /C START "" /WAIT process_to_start.exewhich effectively calls the CMD.EXE environment with the %COMSPEC% command. If you're using strictly Windows 2000 or XP then I personally would stick with just using the CMD extension.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now