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,893 of 42,547    |
|    foxidrive to ehabaziz2001@gmail.com    |
|    Re: processing same files with same pref    |
|    16 Jan 14 12:52:36    |
   
   From: foxidrive@server.invalid   
      
   On 16/01/2014 09:46, ehabaziz2001@gmail.com wrote:   
   > The pairs are like each other :   
   > files like this :   
   >   
   > ehab_part1.txt   
   > ehab_part2.txt   
   >   
   > AndyJones_part1.txt   
   > AndyJones_part2.txt   
   >   
   > I need to concatenate each pair in one file ,   
   > Thanks   
      
      
      
   @echo off   
   for /f "tokens=1,* delims=_" %%a in ('dir *.txt /b ') do (   
    if not exist "%%a.txt" copy "%%a_*.txt" "%%a.txt"   
   )   
      
   --- 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