Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: From: Omni Encoder 1.0 Released (Read 2576 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

From: Omni Encoder 1.0 Released

@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: [Select]
set encoder="C:\Program Files\FLAC\flac.exe"
for /R "%1" %%f in (*.flac) do %encoder% -8 -V -f "%%f"


CU, Martin.

From: Omni Encoder 1.0 Released

Reply #1
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: [Select]
@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.

From: Omni Encoder 1.0 Released

Reply #2
(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 

From: Omni Encoder 1.0 Released

Reply #3
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  ) 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.

From: Omni Encoder 1.0 Released

Reply #4
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