I am having some issues with the basics, I'm sorry to use your time but I had spent several days of search and got no results.
I have the next folder structure, in a test folder on the desktop:
Code: Select all
\test \1 \empty \2 \a11.txt \b11.txt \3 \a11.txt \b11.txt \a1 \empty \a2 \a11.txt \b11.txt \a3 \empty \Test1 \a12.txt \b12.txt \Test2 \a23.txt \b23.txt
The code I tried is simple:
DIR C:\Users\Tesla-Project\Desktop\test\a*.txt /S /O -L >lista.txt 2>&1
The issue with this code is that it runs all folders contained in \test folder. If this folder contains a lot of files the batch will take a very long time to process.
I need to exclude the 1,2,3,a1,a2,a3 folders and have the program run only \Test1 and \Test2 folders.
If I try to use % or * for the Test folder, I have no result:
DIR C:\Users\Tesla-Project\Desktop\test\Test*\a*.txt /S /O -L >lista.txt 2>&1
I feel like I am missing something very simple but I really cannot find a solution for this...
Could someone help me on this please?