Re: shntools and cyrillic letters?
Reply #4 – 2017-03-04 09:09:12
Huh, I never realized that might be the way to do it. I'll be sure to look into that. I did come up with a workaround yesterday. Well, not to the cyrillic issue but the string parse one. However, life is filled with cruel little jokes like that one. I solved my issue with extracting the folder name but once I had it running I realized it was a Pyrrhic victory and that I'd painted myself into a corner, the computer will only do what I tell it to and it has no way of knowing the file structure unless I give it strict instructions about it. I will look into the PowerShell as well, but now that I'm getting warmed up, I'm not sure it's needed? Since the issues has sort of worked themselves out there isn't really any real reason for posting the code but I'll do it all the same just for completeness. Who knows, maybe it'll help someone else?@echo off SETLOCAL enabledelayedexpansion FOR /R "%~1" %%I IN (*.cue) DO ( SET str=%%~dpI for %%a in ("!str:~0,-1!") do (SET p=D:\Converted\%%~na\) MKDIR "!p!" pushd "!p!" IF EXIST "%%~dpnI.ape" (shntool split -f "%%I" "%%~dpnI.ape" -m :-/-*x?! -t "%%n. %%t" -o flac) IF EXIST "%%~dpnI.flac" (shntool split -f "%%I" "%%~dpnI.flac" -m :-/-*x?! -t "%%n. %%t" -o flac) IF EXIST "%%~dpI*.jpg" (convert "%%~dpI*.jpg" -resize "400>" "!p!image-%%d.jpg") IF EXIST "%%~dpI*.png" (convert "%%~dpI*.png" -resize "400>" "!p!image-%%d.jpg") ) Needless to say, I miss the use of logic functions... It's a work in progress.