How can I create a boolean in the `if` statement within the for loop to check for existence of term prepended to filename %%f?
- by user784637
I have lyrics for about 60% of my song collection. The filename of the lyrics is the same as the file name of song with zzz_ prepended to the filename and .lrc as the extension.
C:\Songs\album\song.mp3
C:\Songs\album\zzz_song.lrc
I currently print the file names like so
for /r "C:\Songs" %%f in (*.mp3 *.flac) do (
echo %%f
)
How can I create a boolean in the if statement within the for loop as a check on the existence of lyrics files?
I was thinking something like
if exist zzz_%f echo zzz_%f.lrc
but zzz_%f prepends zzz_ to the full file path (ex. zzz_C:\Songs\album\song.mp3) and .lrc is appended to the existing extension