Off topic DOS question

Mark Musone mmusone at shatterit.com
Mon Feb 7 18:03:17 EST 2005


Heres a quick example using tcsh command line (cause I'm a tcsh lover):

$ foreach i ( *.2d )
foreach? dlink $i `basename $i .2d`.drg
foreach? end


if you want to do it recursively, you can just do it using the find command
(any shell):

$ find . -type f -name "*.2d" -exec /path/to/myprog {} \;

where /path/to/myprog is a little shell script:

#!/bin/sh
dlink $1 `basename $1 .2d`.drg






-Mark




-----Original Message-----
From: owner-nflug at nflug.org [mailto:owner-nflug at nflug.org] On Behalf Of
Justin Bennett
Sent: Monday, February 07, 2005 5:40 PM
To: nflug at nflug.org
Subject: Re: Off topic DOS question

you can't run it on a while directory with say *.*? If not do you have a 
list of files for converting, say in a txt file from a direcrtory 
listing or something? If you can get a list you can create a .bat file 
(like a shell script) with 180,000 entries, they're might be some other 
utilities that do the same thing, but this will work.

dlink file1.2d file1.drg
dlink file2.2d file2.drg
dlink file3.2d file3.drg

and so on.

You can make this .bat file with something like excel using the 
concatenate function to get the syntax (though you might have to take it 
64,000 rows at a time) then you can get the whole list of commands for 
180,000 files, put them in a .bat file,either by copying to notepad, or 
save a somekind of text like tab or csv, save it as a .bat run it and wait.








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?
>
>Thanks,
>Chet
>
>  
>






More information about the nflug mailing list