Help - Search - Members - Calendar
Full Version: From: Omni Encoder 1.0 Released
Hydrogenaudio Forums > Misc. > Recycle Bin
Martin H
@krabapple

Untill Jebus adds support for custom fields like 'COMPOSER' and 'REPLAYGAIN_*', then i would suggest that you do the job with a batch file.

Save the following script to a file with a .bat extension and then drop your folder holding your FLAC collection on top of the batch file(it dosen't matter if the folder contains sub-folders also). Remember to first enter your specific path for your flac.exe executable located on your system(just after: set encoder=). This batch file will re-encode all your FLAC files to the newest version using -8 -V and then the -f switch forces the over-writing of the output-file so that you will keep the same file name(and the old file is deleted/over-written).

CODE

set encoder="C:\Program Files\FLAC\flac.exe"
for /R "%1" %%f in (*.flac) do %encoder% -8 -V -f "%%f"


CU, Martin.
krabapple
Thanks for the script, Martin!

(later)

I'm afraid it's not working for me. I made sure I was pointing to my flac.exe, and that the .bat file was not saved as a text file (saved as 'All Files' not 'Text'). Also tried saving it as a .cmd file; tried removing the -f switch; tried adding @echo off.
IN all cases when I drop a folder of .flac files onto it, it very briefly opens and closes a terminal window.

a test.bat file

CODE

@echo off
echo Hello this is a test batch file
pause
dir c:\windows


runs fine when I click it or drop something on it, so it's not my environment (WinXP Pro) that's off.

(still later)

Fixed it. Apparently the path to my flac files was too long (I had the test directorry on my desktop, mayeb too many spaces in that path?). Anyway, once I moved the .cmd file and the flac files clolser together in my directory structure, it worked fine. Thanks again.
krabapple
QUOTE(krabapple @ Jan 5 2007, 10:56) *



(still later)

Fixed it. Apparently the path to my flac files was too long (I had the test directorry on my desktop, mayeb too many spaces in that path?). Anyway, once I moved the .cmd file and the flac files clolser together in my directory structure, it worked fine. Thanks again.



(much later)

and now it's not working blink.gif

Martin H
Hmm, before i posted the script, i actually tested it out on a test folder with two subfolders in it and each containing a single FLAC file which i quickly made for the test from some MP3's in fb2k. Are you sure the path to flac.exe is correct ? Have you removed the double quotes from the path since you shouldn't do that ? Anyway, i must confess that i am a relative beginner in CMD scripting myself as i ussually use GUI apps for all my needed tasks. I just put that simple script together after having searched back in Synthetic Soul's old posts after one of his numerous batch files examples he has posted to help people out with various tasks. I then looked at a script Synthetic Soul had posted once and then i looked up some of the commands at ss64.com and then i quicky made the script. When i first tested it out, then it didn't worked out at first. Then i added the "%1" parameter to the script and then it did work out fine after that, but i actually don't understand why, since adding a path to the command is optionally and the path should be taken from the dropped folder i believe since Synthetic Soul haden't used that parameter in his scripts ? Anyway, i'm sorry i can't be of any help with your issue and i guess you will have to wait for Synthetic Soul to see this thread and then i'm sure he will help you out(and probably say that i have screwed the script up somehow crying.gif ) Anyway, i apologise in advance if the script is faulty, but i don't understand why, since it seemed to wok fine on my system and flac.exe stated the correct name for the files it was encoding and then when finished it stated "x bytes written" and no error mesages occured...

CU, Martin.

Edit: I'm sorry Jebus for going off-topic.
krabapple
Thanks Martin, I don't know why it worked once in the morning and then stopped working in the afternoon, so I suspect it's something at my end. I'll keep investigating (and learn about scripting batch files in the process)


(I'm moving the rest to a more appropriate thread)

http://www.hydrogenaudio.org/forums/index....st&p=462402

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.