473,671 Members | 2,578 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple File Conversions via Batch File

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

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 %%1
SHIFT
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?
Mar 2 '06 #1
4 2647
<so*****@somedo main.com.invali d> 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.
Armin

Mar 2 '06 #2

<so*****@somedo main.com.invali d> wrote in message
news:Qw******** ********@fe12.l ga...
Hello, @ECHO OFF
:LOOP
FOR %%1 IN (.) DO C:\"Program Files"\flac\bin \flac.exe -8 %%1


I would try "C:\Program Files\flac\bin\ flac.exe" -8 %%1

or C:\Progra~1\fla c\bin\flac.exe -8 %%1

Mar 3 '06 #3

"Armin Zingler" <az*******@free net.de> wrote in message
news:en******** ******@TK2MSFTN GP14.phx.gbl...
<so*****@somedo main.com.invali d> 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!!

Mar 3 '06 #4
"Homer J Simpson" <no****@nowhere .com> schrieb im Newsbeitrag
news:P8NNf.1080 4$vC4.4421@clgr ps12...

"Armin Zingler" <az*******@free net.de> wrote in message
news:en******** ******@TK2MSFTN GP14.phx.gbl...
<so*****@somedo main.com.invali d> 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!!


Yes, seems to be.
Armin

Mar 3 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
7497
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I have an series of interactive HTML forms. The user begins a Cookie session. A database connection is opened and a transaction is begun. After the user goes through any number of pages where they update the database they finish on a page where...
4
47493
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup) 4) Once the copy is complete, the batch file opens the Access database again 5) EXIT should close out the cmd window but it does not execute that line
3
2594
by: Polaris | last post by:
Hi: I'm using VC 7.1. I like to have multiple actions taken after a build is complete. For example, I'd like to copy the files into multiple directories. But so far I can only specify ONE action, seems no way to specify more than one action there, I might be able to use a batch file for it but just whish there is something better. Guess I must have missed something. any info is appreciated. Thanks In Advance!
5
6165
by: Arsen V. | last post by:
Hello, What is the optimal way to insert multiple rows (around 1000) from a web application into a table? The user enters multiple lines into a text box (up to 10,000). The ASP.NET application breaks that data into a string array. Each line is an item of that array. The user clicks Submit.
4
3630
by: Joey C. | last post by:
Hello. I'm writing a program that creates a series of batch operations to convert movies to be used on iPodLinux. The programs that do the encoding and conversions are seperate from mine and all mine does is use os.system() to call the program. However, it needs to get an input file and an output file. Originally I was using just raw input, but I got adventuresome and decided to try win32ui.CreateFileDialog(). But this will only open...
1
7202
by: bg_ie | last post by:
Hi, I created a COM object using C# and I installed it with a batch that looks something like this - ECHO OFF PATH = C:\WINNT\Microsoft.NET\Framework\v2.0.50727 set target=C:\mydll.dll echo * Unregister %target% with v2.0.50727 regasm.exe /u %target%
0
1374
by: dave32079 | last post by:
I am moving data from Oracle to MS SQL 2000. I have been given the Oracle table structures and about 130 CVS files to populate these structures, 1 file per table. I have converted the table structures to a MS SQL format and successfully created the tables but I am having problems creating the DTS package. I have set the package with Global Variables that allow me to specify which file to send to the given tables (see batch call below). ...
14
12796
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in case it's a question, i want to popup a messageBox or something, and bring back to the batch file the result (Yes\No question). I know how to excute the batch file and get all the Standard output at the end, but i don't know who can i read it line by...
2
13660
by: pavanponnapalli | last post by:
hi, I have got a batch file where i have written the following modules from CPAN: ppm install DBI ppm install DBD::mysql ppm install Config::Properties ppm install Net::SMTP ppm install IO::Socket ppm install Log::Handler
0
8481
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8400
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8823
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7441
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6234
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.