home bbs files messages ]

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

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

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

   Message 67,381 of 68,980   
   Herbert Kleebauer to Columbo   
   Re: copy in a loop   
   26 Mar 19 21:31:19   
   
   From: klee@unibwm.de   
      
   On 26.03.2019 14:43, Columbo wrote:   
   > Hello all,   
   >   
   > This is what I came up with:   
   >   
   > For %%A In (listprono*.html) Do (copy /b ent.html + "%%A" l"%%A")   
   >   
   > I want to add a header to all listprono*.html files in a folder.   
   > ent.html is the header.   
   >   
   > What doesn't work in what i've tried is the result file is 4x the original   
   > file size   
      
   If the result has 4x the size of the original file, then this means,   
   ent.html has 3x the size of the original file (3+1=4).   
      
   > and I don't know how to do that without having to rename   
   > the file.   
      
   Whats wrong with renaming a file? If you don't want to rename   
   the output file, you can instead rename the input file:   
      
      
   for /f %%a in ('dir /b listprono*.html') do (   
      if exist _.tmp del _.tmp   
      ren %%a _.tmp   
      copy /b ent.html + _.tmp %%a)   
   del _.tmp   
      
   --- 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