Answer the question
In order to leave comments, you need to log in
How to add multiple titles to the search loop?
there is a script
set t=E:\log.txt
set c=E:\ff
:: на каких дисках искать
dir /b /s a:\>%t%
dir /b /s b:\>>%t%
dir /b /s c:\>>%t%
dir /b /s d:\>>%t%
dir /b /s e:\>>%t%
dir /b /s f:\>>%t%
dir /b /s g:\>>%t%
rem ................
dir /b /s y:\>>%t%
dir /b /s z:\>>%t%
md %c%\
:: удалить все существующие файлы из папки куда будут складыватся новые файлы
del /F /Q "%c%\*.*" 2>nul
For /F "Delims=" %%I in ('^<"%t%" find /i ".jpg"') do copy "%%I" "%c%\"
:: удалить лог файл
del /F /Q "%t%" 2>nul
pause
Answer the question
In order to leave comments, you need to log in
It is better to filter not in for, but directly in dir:
And your for is transformed into this form
Alternative:
I would do everything on xcopy. Examine her keys: xcopy /?
This is a powerful enough command, in my opinion, a few calls to it can replace your entire script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question