• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Batch File Help?

NuclearFusi0n

Diamond Member
OK, I need to come up with a batch file that will do this (windows preferably, I'd do it under linux but all my info is on an NTFS partition)

Here's how my files are laid out, I have D:\Music, and inside "Music" I have an individual folder for each album, and each album has a FLAC file and a CUE file. The FLAC and the CUE file have the same filename, except for the extension. I need to make a batch file that will go from folder to folder in D:\Audio, doing this command line:

metaflac --import-cuesheet-from="D:\Music\Tool - Lateralus\Tool - Lateralus.cue" "D:\Music\Tool - Lateralus\Tool - Lateralus.flac"

I want each flac file to have its corresponding cuesheet imported using the metaflac program, and i do NOT want to do it all manually....

Thanks for any help you can give 🙂
 
for /F %%i in ('dir /b d:\music\*.cue') do metaflac --import-cuesheet-from="D:\Music\%%i.cue" "D:\Music\%%i.flac"

something like that, you get the idea...
 
So far i've gotten this....

for /F "eol=. tokens=*" %%i in ('dir /b /s "D:\Audio Images\*.cue"') do metaflac --import-cuesheet-from="%%i.cue" "%%i.flac"


everything works, except I need to figure out some way to strip the .cue from %%i before the do command is executed. It's trying to execute this:

metaflac --import-cuesheet-from="D:\Audio Images\Tool - Lateralus\Tool - Lateralus.cue.cue" "D:\Audio Images\Tool - Lateralus\Tool - Lateralus.cue.flac"
 
Nevermind, i did

dir /b /s "D:\Audio Images\*.cue" > C:\myfile.txt

and loaded myfile.txt into notepad, used find and replace to kill all the .cue parts, and i'm using that as my infile for the for command
 
YAY it worked, thanks smilin'!

C:\WINDOWS\flac>for /F "eol=. tokens=*" %i in (C:\myfile.txt) do metaflac --import-cuesheet-from="%i.cue" "%i.flac"
 
Back
Top