olegpronin
А если вот так:
Код: @echo off
set "_dest=c:\FLAC\"
dir /B /AD /S *[FLAC] > list1.tmp
setlocal ENABLEDELAYEDEXPANSION
for /F "delims=" %%I in (list1.tmp) do (
set "folder=%%I"
set "folder=!folder:%_dest%=!"
echo/!folder! >> list2.tmp
)
for /F "delims=\ tokens=2" %%I in (list2.tmp) do (echo/%%I>>list.txt)
del *.tmp
А если вот так:
Код: @echo off
set "_dest=c:\FLAC\"
dir /B /AD /S *[FLAC] > list1.tmp
setlocal ENABLEDELAYEDEXPANSION
for /F "delims=" %%I in (list1.tmp) do (
set "folder=%%I"
set "folder=!folder:%_dest%=!"
echo/!folder! >> list2.tmp
)
for /F "delims=\ tokens=2" %%I in (list2.tmp) do (echo/%%I>>list.txt)
del *.tmp