|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Multiple File Conversions via Batch FileI am attempting to convert multiple .wav files to the .flac format via a batch script. I know that this can be done with numerous software implementations automatically for me; however, i am interested to understand how to create a script to perform my purpose and since this function is useful, what the hey! I am rather new to batch files but would appreciate any help. TIA My process thus far has been the following: I edited the file type .wav via Tools>Folder Options>File Types I added an option for "Encode to Flac" and pointed this at my "flac-convert.bat %1" Essentially this works fine; The script runs and encodes one file with ease. At this point my script was: @ECHO OFF C:\"Program Files\flac\bin\flac.exe -8 %1 However, when I highlighted multiple .wav files in Explorer and click my "Encode" option multiple instances of the batch file are run. I attempted to solve this with the following code: @ECHO OFF :LOOP FOR %%1 IN (.) DO C:\"Program Files"\flac\bin\flac.exe -8 %%1SHIFT IF "%1" == "" GOTO END GOTO LOOP :END When I ran this code I hit another stumbling block. The code was parsing the %1 differently than it had in my original instance where flac was run directly. The filenames contained are something like My_alto-sax_solo.wav When I ran the first script this was parsed fine and the wav file was encoded; but, when the flac.exe was run from within the FOR loop the input file is claimed to be invalid.So my question is two part: 1)Understanding the parsing of text within a Batch File: How does passing a command within a FOR alter the way arguments are passed to it? and 2) Is it possible to only run one instance of the batch file via some setting within Windows? <some***@somedomain.com.invalid> schrieb
> Hello, I don't see the relation to the VB.Net programming language.> I am attempting to convert multiple .wav files to the .flac format > via a batch script. I know that this can be done with numerous > software implementations automatically for me; however, i am > interested to understand how to create a script to perform my > purpose and since this function is useful, what the hey! I am rather > new to batch files but would appreciate any help. TIA Armin "Armin Zingler" <az.nospam@freenet.de> wrote in message This group is now the catchall for everything!!news:enqI0WjPGHA.1216@TK2MSFTNGP14.phx.gbl... > <some***@somedomain.com.invalid> schrieb >> Hello, >> I am attempting to convert multiple .wav files to the .flac format >> via a batch script. I know that this can be done with numerous >> software implementations automatically for me; however, i am >> interested to understand how to create a script to perform my >> purpose and since this function is useful, what the hey! I am rather >> new to batch files but would appreciate any help. TIA > > I don't see the relation to the VB.Net programming language. "Homer J Simpson" <nob***@nowhere.com> schrieb im Newsbeitrag news:P8NNf.10804$vC4.4421@clgrps12...Show quoteHide quote > Yes, seems to be.> "Armin Zingler" <az.nospam@freenet.de> wrote in message > news:enqI0WjPGHA.1216@TK2MSFTNGP14.phx.gbl... >> <some***@somedomain.com.invalid> schrieb >>> Hello, >>> I am attempting to convert multiple .wav files to the .flac format >>> via a batch script. I know that this can be done with numerous >>> software implementations automatically for me; however, i am >>> interested to understand how to create a script to perform my >>> purpose and since this function is useful, what the hey! I am rather >>> new to batch files but would appreciate any help. TIA >> >> I don't see the relation to the VB.Net programming language. > > This group is now the catchall for everything!! Armin <some***@somedomain.com.invalid> wrote in message
news:QwGNf.2882$9_.1274@fe12.lga... I would try "C:\Program Files\flac\bin\flac.exe" -8 %%1> Hello, > @ECHO OFF > :LOOP > FOR %%1 IN (.) DO C:\"Program Files"\flac\bin\flac.exe -8 %%1 or C:\Progra~1\flac\bin\flac.exe -8 %%1 |
|||||||||||||||||||||||