Off topic DOS question
Dave Andruczyk
djandruczyk at yahoo.com
Mon Feb 7 17:54:02 EST 2005
--- colszewski at adelphia.net wrote:
> I have 2 .txt files I need to take the information from both txt files and
> use it as arguments to a program. The program is for file conversions and
> there are about 180,000 files that need converting. Here is an example of
> what I need to do.
>
> The DOS program I need to run is called dlink. And you use the program like
> this,
>
> dlink file1.2d file1.drg
>
> The dlink program handles the converting, but I am looking for and easy way
> to supply the arguments. (other than one at a time) Anyone have any ideas?
>
Dos does have variables, like %1 %2 and so on that correspond to command line
arguments
so if you have a batch file like:
test.bat:
@cls
echo arg 0:"%0", arg 1:"%1" arg 2:"%2"
and ran it as test.bat crappy OS
it would print out:
arg 0:"test.b" arg 1:"crappy" arg 2:"OS"
so you can get command line args into a batch file. You might be a lot better
off going to cygwin.org, installing bash under windows and reading a couple
bash scripting howto's and do it that way as it's a million times more powerful
than DOS batch.
=====
Dave J. Andruczyk
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
More information about the nflug
mailing list