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 41,794 of 42,547   
   T. Ment to Lori Fairhead   
   Re: rename files with prefix   
   18 Nov 19 17:44:19   
   
   From: t.ment@protocol.invalid   
      
   On Mon, 18 Nov 2019 09:33:48 -0800 (PST), Lori Fairhead wrote:   
      
   >> The hard way I think.   
   >>   
   >> dir /b > my.bat   
   >>   
   >> edit the file, duplicate the name column, add your change to the second   
   >> column, and REN each line. Easy with a editor that can copy columns and   
   >> fill column blocks.   
   >>   
   >   
   >This has a problem that it won't deal with SPACE in the filenames,   
   >I would need to also put quotes around the filenames.   
      
   "The hard way" means you do all that work in an editor.   
      
      
      
   > In UNIX that   
   > would actually be easy because 'sed' would do all that for you in   
   > a single command.   
      
   There is a sed for DOS. Don't remember where I got it. I rarely use it,   
   my editor is easier for most tasks.   
      
   --- 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