Page 1 of 1

serch all flac in folder and subfolder? (wrong script)

Posted: 12 Jun 2021 16:34
by lauraq
Hi :)

Can u tell me what I must change in that script for search also in subfolder?

@echo off
chcp 1252

set "nomefile=%temp%\FILES.TXT"
set "file_mask=*.flac

if not exist "%~1"\* exit /b 1

pushd "%~1" || exit /b 1
>"%nomefile%" (
for /f "delims=;" %%X in (' dir /a:-d /b %file_mask% ') do (
set/p"=%%~nX"<nul
echo(
)
)
popd

notepad "%nomefile%"
if exist "%nomefile%" del "%nomefile%"

tHANK :)

Re: serch all flac in folder and subfolder? (wrong script)

Posted: 12 Jun 2021 22:59
by ShadowThief
I don't know what your folder structure looks like so it's impossible to say for certain, but it should be as straightforward as changing

Code: Select all

dir /a:-d /b %file_mask%
to

Code: Select all

dir /a:-d /b /s %file_mask%

Re: serch all flac in folder and subfolder? (wrong script)

Posted: 13 Jun 2021 03:23
by lauraq
is perfect...thanks :)