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,564 of 42,547    |
|    Tom Lavedas to nathanw...@gmail.com    |
|    Re: Dynamic Setting of variable based on    |
|    16 Nov 12 05:12:22    |
   
   From: tglbatch@verizon.net   
      
   On Friday, November 16, 2012 5:57:34 AM UTC-5, nathanw...@gmail.com wrote:   
   > Apologies for delay here are the snippets   
   >   
   >   
   >   
   > I cannot post a screenshot for some reason but these are direct from editor   
   and command line   
   >   
   >   
   >   
   > Code   
   >   
   >   
   >   
   > rem Get Files from Remote Location   
   >   
   >   
   >   
   > for /d %%A in (C:\mnsupgrade\workspaces\version61\NathScript\Scripts\*) do (   
   >   
   > for %%B in ("%%A\*") do   
   >   
   > call :process "%%~A" "%%~B"   
   >   
   > )   
   >   
   > goto :eof   
   >   
   >   
   > :process   
   >   
   > Set folderName=%~nx1   
   >   
   > Set fileName=%~nx2   
   >   
   > echo Processing %filename % in %folderName%   
   >   
   > echo Full Paths are %2 and %1   
   >   
   > Error   
   >   
   > C:\>rem Get Files from Remote Location   
      
   You can't break the second FOR statement that way. It must be all on one line   
   of code or be enclosed in parentheses ...   
      
   for %%B in ("%%A\*") do call :process "%%~A" "%%~B"   
   ____________________   
   Tom Lavedas   
      
   --- 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