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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
lauraq
Posts: 4
Joined: 22 May 2016 02:17

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

#1 Post by lauraq » 12 Jun 2021 16:34

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 :)

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

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

#2 Post by ShadowThief » 12 Jun 2021 22:59

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%

lauraq
Posts: 4
Joined: 22 May 2016 02:17

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

#3 Post by lauraq » 13 Jun 2021 03:23

is perfect...thanks :)

Post Reply