Home / Microsoft / Microsoft Windows / Windows XP / About editing BAT files
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: About editing BAT files  (Read 5931 times)
Wai_Wai
Guest
« 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?
IP logged
jonah
Guest
« 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 » IP logged
Wai_Wai
Guest
« 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 » IP logged
Wai_Wai
Guest
« 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?
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft Windows / Windows XP / About editing BAT files « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.124 seconds with 19 queries.