home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 40,604 of 42,547   
   E. S. Fabian to All   
   Re: For Schleife sortieren   
   16 Feb 13 08:20:44   
   
   XPost: comp.os.msdos.4dos   
   From: ESFabian@zenge.org   
      
   Axel Berger:   
      
   | I'm using 4DOS. Using the command   
   |   
   | for %a in (acc*) do type %a >> logneu.txt   
   |   
   | it is obvious they're executed in their natural order. If those   
   | files were copied before I often hit the Windows idiosyncracy, that   
   | the first in alphabetical order comes last, requiring manual   
   | correction. Is there a way to make For use a predifined oder like   
   | aphabetical or age?   
      
   Sorry, not in 4DOS; not even in TCC/LE. The /O (order) option was added in   
   TCC version 11.   
      
   You can use the DIR command to create an ordered list of the files to be   
   processed in a temporary file (or in the clipboard), and retrieve them   
   (WARNING! NOT TESTED!):   
      
   dir /b /o:d acc* > clip:   
   ( for %a in (@clip:) type %a ) > logneu.txt   
      
   Note that instead of redirecting each TYPE command individually the output   
   of the whole FOR loop is redirected. This is not essential, it is just a   
   techniqued you may not be aware of.   
   --   
   HTH, Steve   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca