I store folder names for my mp3 albums in small .mp3 files (long story). I want to validate these names against the actual folders (which are on multiple drives). My first thought was to run the following export config against the list of small .mp3's:
$filename($getEnv('USERPROFILE')'\desktop\FolderNameCheck.bat',UTF-8)
echo off
chcp 1254$loop(%_folderpath%)
IF NOT EXIST "%drive%%_filename%" echo %_filename% MISSING$loopend()
pause
Unfortunately the chcp command doesn't work with IF NOT EXISTS so non-ASCII characters in folder names show up as errors (lots of them).
I am not sure what you want to compare.
If you want to test if the data in e.g. %album% is matched by the folder name (or parts of the path), then you can check that per file.
To find folders without such a file might be done with 2 steps:
first a dir command that lists the existing files to a file
second a dir command that lists all folders to a file
You then sort by the name and get a list that shows the gaps.