HELP - How to recurse a directory structure ?
Posted: 27 Apr 2013 04:46
I need to obtain the Full path and name of all the files that match a chosen pattern that are within an archive that may have 3 (possibly 4) levels of sub-directories.
This is the code which deals with every file that is within a single folder
CALL :PATH "R:\LS-3.3.1\RecoveredData\_E_GPT_E__465.82 GB_NTFS\Images\Test\D\"
I need that fixing so that it will recurse through every child of the parent
R:\LS-3.3.1\RecoveredData\_E_GPT_E__465.82 GB_NTFS\
This is what I have so far for the single folder :-
Regards
Alan
This is the code which deals with every file that is within a single folder
CALL :PATH "R:\LS-3.3.1\RecoveredData\_E_GPT_E__465.82 GB_NTFS\Images\Test\D\"
I need that fixing so that it will recurse through every child of the parent
R:\LS-3.3.1\RecoveredData\_E_GPT_E__465.82 GB_NTFS\
This is what I have so far for the single folder :-
Code: Select all
@ECHO OFF
SET P=password
CALL :PATH "R:\LS-3.3.1\RecoveredData\_E_GPT_E__465.82 GB_NTFS\Images\Test\D\"
PAUSE
GOTO :EOF
:PATH
ECHO TESTING %1
FOR %%a IN (%1*-00-*.mrimg) DO SET ITEM=%%a
ECHO VERIFYING "%ITEM%"
REM ------------ CODE BELOW NOT RELEVANT TO RECURSION ------------
GOTO :EOF
SET OOPS=FAILED - A verification error %errorlevel% has occurred - ? is %P% a valid archive password ?
"verify.exe" "%ITEM%" -v --password "%P%" && SET OOPS=OK
ECHO %OOPS%
Regards
Alan