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,561 of 42,547    |
|    Nathan Wilson to All    |
|    Dynamic Setting of variable based on Fol    |
|    15 Nov 12 03:53:13    |
      f8d7f8ea       From: nathanwilson41@gmail.com              Hi all              I suppose it sounds like a simple matter but for someone who has not       done this in ages I am struggling.              I have a directory structure on a remote server              X:\A\B\w.txt       X:\A\C\x.txt       X:\A\D\y.txt       X:\A\E\z.txt              Ok i can xcopy the Base folder eg xcopy x:\A /S to re-create the       folder structure locally and the /S will ensure that only folders with       content will be copied              I need to then go to each folder note the folder name as a var and the       process the file in the folder              I have written the code to get the folder and file name but here is       where I hit a major hump              It only processes the last folder unless I specify a folder name       manually              I need the code to go to first folder, set folderName to name of       folder and then get file inside              Once I have folder and file name I can pass to sub routine that       processes              Once that is ran the process should then go to the next folder and run       again replacing the folder name with the next in line              So basically go to A       Set folderName = B       Set filename = w.txt              process in sub routine              go to A       Set folderName = C       Set filename = x.txt              process etc etc              Any help existing code would be very gratefuly received              nathan              --- 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