Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: About editing BAT files  (Read 21911 times)

0 Members and 1 Guest are viewing this topic.

Wai_Wai

  • Guest
About editing BAT files
« on: August 25, 2004, 12:45:27 AM »
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

  • Guest
Re: About editing BAT files
« Reply #1 on: August 25, 2004, 01:39:37 AM »
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. :)
« Last Edit: August 25, 2004, 02:26:50 AM by jonah »

Wai_Wai

  • Guest
Re: About editing BAT files
« Reply #2 on: August 25, 2004, 04:03:05 AM »
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.
« Last Edit: August 25, 2004, 04:09:46 AM by Wai_Wai »

Wai_Wai

  • Guest
Re: About editing BAT files
« Reply #3 on: August 25, 2004, 04:04:43 AM »
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. :)



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?