Microsoft > Windows XP
About editing BAT files
(1/1)
Wai_Wai:
About editing BAT files
I created a BAT file for a program called FSUM (It is a program for checksum).
In my BAT file, it contains:
fsum -md5 -r *.* >md5_checksum.txt
The above command will copy the output to a txt file. However if there's an existing file with the same name already, it will overwrite it without prompt.
How to prompt if the program is going to overwrite a file? Does anyone know any command which can do so?
jonah:
Wai_Wai
Look at this link, it should give you some clues:
http://www.computerhope.com/msdos.htm
You might be able to do something like this:
fsum -md5 -r *.* >md5_%time%.txt
Its been a long time since I've done anything with DOS batch files. There are certainly others here who have more recent experience in this topic. Please correct me if I'm not correct. :)
Wai_Wai:
Hi.
What does "%time%" in >md5_%time%.txt do?
Anyway, I tried it but the comptuter said "parameters are incorrect".
I read your suggested website before you told me, but in vain.
Wai_Wai:
--- Quote ---Wai_Wai
Look at this link, it should give you some clues:
http://www.computerhope.com/msdos.htm
You might be able to do something like this:
fsum -md5 -r *.* >md5_%time%.txt
Its been a long time since I've done anything with DOS batch files. There are certainly others here who have more recent experience in this topic. Please correct me if I'm not correct. :)
--- End quote ---
And since you said you don't use BAT for a long time, so did you find any other more powerful things to replace BAT?
If so, what are they and how good they are?
Navigation
[0] Message Index
Go to full version