I want to compress all the folders that contain the word (Album), these folders have the following structure
Michael Jackson\Invincible (Album)
Michael Jackson\Thriller (Album)
Luciano Pavarotti\'O sole mio (Single)
Queen\Bohemian Rhapsody (Single)
So far I've tried this, but it doesn't work for me.
@echo off
setlocal enabledelayedexpansion
for /f "tokens=*" %%f in ('dir /s /b /ad "*(Album)"') do (
set "filename=%%~nf"
"%ProgramFiles%\WinRAR\Rar.exe" a -ep1 -idq -r -y %filename%
echo %filename%
)
pause