Subj : Re: Howto copy set of files with rename to shorter name? To : Steve From : Klaus Meinhard Date : Sat Mar 09 2002 11:26 pm From: "Klaus Meinhard" Steve, > In 4NT, 4DOS, and TakeCommand, even cleaner is: > > for %f in ( longname-[0-9][0-9]-[0-9][0-9].txt ) rename %f > F00-%@instr[0,-5,%@name[%f]].txt If we're passing judgments (cleaner), the replacement of @instr with for %f in ( longname-[0-9][0-9]-[0-9][0-9].txt ) rename %f F00-%@right[5,%@name[%f]].txt (in 4dos since V. 6) comes to mind :-) Note that the wildcard construction above is only necessary if there are actually other files with names starting with "longname" in that directory. -- Viele Gre, best regards, *Klaus Meinhard* 0736'57" East 5307'52" North Author of the 4XBTM batch collection at http://www.4xbtm.de --- BBBS/NT v4.01 Flag-2 * Origin: Mach2 Systems (1:342/3) .