Anyway no mighty help, but maybe a direction to go ...
FOR /F "usebackq tokens=*" %%D IN (`DIR "%ROOT%" /B/AD/S/-P`) DO (
DIR "%%D" /B/A/-P >NUL. 2>&1
IF ERRORLEVEL 1 (
ECHO ###Folder "%%D" is empty
... is set, because a foldername with an exclamation mark "!" otherwise is not recognized.
Foldername "Fehlfarben - 2006 - 26 1⁄2" still cannot be handled and will be reported as empty.
Note: The "⁄" is not a normal slash, but a unicode character (hex:E2 81 84).
But I think I sent you in the wrong direction with the empty folders.
Actually I don't need to check for empty folders.
What I need is check in every folder if there are any mp3 or flac files and if it is true check if folder.jpg is missing
I tried something inside the loop which seems to work to some extent.
DIR "*.mp3" >NUL 2>&1
IF ERRORLEVEL 1 (
IF NOT EXIST "%%~fD\\%FS%" echo %%~fD%>>no_covers.m3u
But it gives false positives on empty folders.
And do you know how to set root to the folder where the cmd file is started in?
Huh, how that? Sorry for the invonvenience.
I will download the uploaded file for myself and try to detect what happened with the text file.
There is a zip file attached containing the command file.
I have added a notice into the command file how to create BOM characters via keyboard.
Please try this. Attachment 3590 not found.
Note: It is possible that Avira reports a false alarm for this cmd file in the zip file.
I've just reported the false alarm to Avira.
The same command file in a 7-zip file is ok for Avira.
But sadly the Forum does not allow to upload a 7-zip file.
Proposal: Upload should be opended for .7z files too.
Deltev it seems you must do the opposite, use codepage 1252 to create the unicode files.
In cp 850 these chars have different codepoints (maybe that's the reason, I don't really know)
At least it works for me.
Now I know, I should have used a Windows oriented script language from the first step.
Using olde DOS and it's codepages it is more tricky than I have ever expected.
And it seems that you are right that I've mangled the code points and the code pages and what ever more.
I will look into again, but at first I need a break.
I was always thinking on the DOS level in codepage 850 but used a Windows ANSI editor to write the script. Using the old DOS EDIT editor makes it clear in a moment.
But I could not find out why it has worked for me and not for you.
There is a new version of the CFP tool attached. Now official release v1.00.
I hope the code is self explaining. There are user configurable sections.
Beside setting a folder root permanently in the code, the script can be called with one parameter as the root folder to be used for the current run.
A folder can also be dropped onto the cmd file icon and will be used as the root folder for the current run.