Loop through files in 1 folder and NOT any subfolders batch
batch-file, directory, for-loop
Solution
Don't use the /R option of the FOR command.
Try just
FOR %%G IN (C:\ExecutionSDKTest_10.2.2\*.properties) DO Echo %%G
Problem
I'm trying to loop through all files of .properties extension, in a root folder:"C:\ExecutionSDKTest_10.2.2\, but not any subfolders within that root folder, how can I achieve this result? Code below: ``` FOR /R "C:\ExecutionSDKTest_10.2.2\" %%G IN (*properties) DO Echo %%G ```