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 40,574 of 42,547   
   foxidrive to nathanwilson41@gmail.com   
   Re: Dynamic Setting of variable based on   
   19 Nov 12 23:15:15   
   
   From: not@this.address.invalid   
      
   On 19/11/2012 22:08, nathanwilson41@gmail.com wrote:   
   > foxi   
   >   
   > using your code i received the following output   
   >   
   > C:\Test>TEST   
   >   
   > folder is: "A" file is : "W.txt"   
   >   
   > Press any key to continue . . .   
   >   
   > folder is: "B" file is : "W.txt"   
   >   
   > Press any key to continue . . .   
   >   
   > folder is: "C" file is : "W.txt"   
   >   
   > Press any key to continue . . .   
   >   
   > however when I try and pass the variables to a call command, it only   
   processes the once and does not repeat for all 3   
   >   
   > nath   
      
   It would help enormously to show what you have done.  Apparently Todd's   
   solution worked too...   
      
   This should call mybatch.bat and %1 will be "x:\a\b" etc and %2 will be   
   "w.txt" etc   
      
      
   @echo off   
   for /f "delims=" %%a in ('dir /ad /b /s') do (   
   pushd "%%a"   
   for %%b in (*.txt) do call mybatch "%%a" "%%b"   
   pause   
   popd   
   )   
      
      
      
   --   
   foxi   
      
   --- 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