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 41,792 of 42,547    |
|    Herbert Kleebauer to Lori Fairhead    |
|    Re: rename files with prefix    |
|    18 Nov 19 17:47:07    |
   
   From: klee@unibwm.de   
      
   On 18.11.2019 16:57, Lori Fairhead wrote:   
   > Hello there,   
   >   
   > I am not very familiar with NT BATCH programming yet   
   > but I had previously assumed that the command:   
   >   
   > REN * VIETNAM-*   
   >   
   > would rename all files in the current directory to   
   > include a prefix of VIETNAM-.   
   >   
   > It didn't do that, instead it superimposed the prefix   
   > onto the filename at the beginning,   
   >   
   > How would I add a prefix to all the current files   
   > in the directory?   
      
   At the command promt:   
      
   for /f %i in ('dir /b') do ren "%i" "VIETNAM-%i"   
      
   in a batch file:   
      
   for /f %%i in ('dir /b') do ren "%%i" "VIETNAM-%%i"   
      
   --- 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