M
MVB
Hi All,
I want to get a list of files from specified list of folders. I have
written following script but it is not working.
--------------------------------------------------------------------------------------------------------------------------------------
@echo off
SetLocal EnableExtensions EnableDelayedExpansion
rem # List of folders to be serched
set FOLDER_ARRAY=abc, def, xyz
rem # Get the folder list
FOR %%G IN (%FOLDER_ARRAY%) DO (
set folder=%%G
rem # Find files as *.orig in the specified folder
FOR /R !folder! %%F IN (*.orig) DO (
echo %%F
)
)
endlocal
--------------------------------------------------------------------------------------------------------------------------------------
In above script if I "echo !folder!" it is giving proper results but
it is not expanding properly in the second for loop.
Can anyone help me in this.
Thanks
MVB
I want to get a list of files from specified list of folders. I have
written following script but it is not working.
--------------------------------------------------------------------------------------------------------------------------------------
@echo off
SetLocal EnableExtensions EnableDelayedExpansion
rem # List of folders to be serched
set FOLDER_ARRAY=abc, def, xyz
rem # Get the folder list
FOR %%G IN (%FOLDER_ARRAY%) DO (
set folder=%%G
rem # Find files as *.orig in the specified folder
FOR /R !folder! %%F IN (*.orig) DO (
echo %%F
)
)
endlocal
--------------------------------------------------------------------------------------------------------------------------------------
In above script if I "echo !folder!" it is giving proper results but
it is not expanding properly in the second for loop.
Can anyone help me in this.
Thanks
MVB