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,422 of 42,547   
   foxidrive to Jean-Pierre Coulon   
   Re: adding leading zeroes to a numeric v   
   26 Jan 16 01:40:17   
   
   From: foxidrive@server.invalid   
      
   On 26/01/2016 00:08, Jean-Pierre Coulon wrote:   
      
   > FOR /L %%A IN (1001,1,1200) DO call: routine %%A   
      
   > I obtain the message at each line: call: routine    
   > can't find this file   
   > name.   
      
   I had the space after the : and it should have been before it.   
      
   Try this:   
      
      
      
   @echo off   
   FOR /L %%A IN (1001,1,1200) DO call :routine %%A   
   goto :eof   
   :routine   
   set num=%1   
   set num=%num:~-3%   
   convert p%num%.jpg > p%num%.gif   
      
   --- 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