Solved Batch command in dos

September 30, 2014 at 21:27:26
Specs: Windows 8
Hi There,
I'm going to use a software called DOE2E in dos, the command line goes like this

DOE2E weartherFileName Filename

I need to apply the same command to about 50 files that their names start with "as" how do I write this command so that DOE2E runs all 50 files at once. Please note that weatherFileName is fixed for all of them.


message edited by raniat

See More: Batch command in dos

Report •

October 1, 2014 at 05:28:36
Hi Raniat,

I think there are various ways to do this. With standard original dos, you could cover all the characters in a file name and its extension, some characters, or just individual characters. See below for examples:-

AS*.* This one may do what you require.

Please note, the above is for standard DOS, which uses file names upto 8 characters long, and extensions 0-3 characters

Also, directories (now called folders) and/or sub-directories might need to be included.

Good Luck - Keep us posted.

message edited by Mike Newcomb

Report •

October 1, 2014 at 06:48:33
Mike ,
Thank you for answering my question. The command I'm trying to run goes like this :

DOE2E Filename weartherFileName

for example if I want to run this command for a file called as22.inp using a weather file called chicagotry.eps my command will look like this

DOE21E as22 chicagotry

Please note that I don't write the .inp or .eps next to the file names.

after I run the command the program creates an output file called ass22.out .

according to your suggestion I wrote the following command line

for %j in (as*) do doe21e "%j" chicagotry

the program ran all 50 files, however it created an output files with .inp and .out at the end of the files name for, instance" as22.inp.out" . Therefore the output files aren't valid, and when I opened them I found out they're blank.

Any recommendation to overcome this problem?


Report •

October 1, 2014 at 07:11:56
✔ Best Answer

for %j in (as*) do doe21e "%~nj" chicagotry

By the way there is no DOS in Windows 8 as it is a NT kernel system and you are running a cmd.exe console program.

Report •

Related Solutions

October 1, 2014 at 07:17:31
This worked like a charm, Thank you so much you just saved me a lot of time and effort.

Report •

Ask Question