Re: BatchProcessing Files on Windows

[email protected]
Newsgroups gmane.comp.audio.sox
Message-ID <trinity-b434f999-63ab-41da-833c-1b4cc8deaf56-1590568482088@3c-app-webde-bap28>
Hi,

I don't understand exactly, what you want to do. And it's not very different using sox with linux. May be this could help? This could be a *.cmd:

for %%a in (*.wav) do "C:\sox.exe" [...] "%%a"

pause

After sox you could give in your [paramters].

Regards

Thomas

-------- Weitergeleitete Nachricht --------

Betreff:
Re: [SoX-users] BatchProcessing Files on Windows

Datum:
Wed, 27 May 2020 08:09:29 +0000

Von:
Nils Wallgren <[email protected]>

Antwort an:
[email protected]

An:
[email protected] <[email protected]>

Thanks for the reply. I am using windows 10 command prompt. Maybe not optimal but It’s kind of hard to know

which one to use if your not an experienced programmer. I have Git Bash, is this is what you mean? But I don’t use it

because I can’t get the set audiodriver to work as I could in the command prompt. In cmd.exe this is the first thing I do

set audiodriver=waveaudio and I am ready to go. I guess there is a simple way to set up this from bash but

I havn’t found any answer. The amount of questions quickly escalates

When I ran your first script inside bash it didn’t work

Just to make things clear:

I ran this inside of Git Bash from a chosen folder set as my cd

I also have to create a new folder within in this cd with mkdir?

Then I’ll use for F in *.wav ; do

sox $F -b 8 nameoffolder/$F

done

But It doesn’t work

But It would be nice to run it inside Command Prompt in windows 10.

I have been using sox in with cmd.exe because it worked for but most information I find using sox is on Linux

So maybe I should switch..

Sent from Mail for Windows 10

From: Jeff Learman

Sent: Wednesday, 27 May 2020 02:23

To: [email protected]

Subject: Re: [SoX-users] BatchProcessing Files on Windows

For the first question, I'll let the devs answer, but apparently sox doesn't batch.

For the second question, that's not a sox issue; it's a scripting question. What shell are you using? For bash:

for F in *.wav ; do

sox $F -b 8 mydir/$F

done

I'm guessing you use Windows CLI? For that I'd use this: https://ss64.com/nt/for2.html -- so it looks like you just need %% instead of %, and a backslash between the dir name and the wave file name.

Jeff

On Tue, 26 May 2020 at 18:31, Nils Wallgren <[email protected] > wrote:

I have some problems getting these things to work:

1 I want the duration of a couple of soundfiles in a directory

sox --i -D kick_*.wav

the name of the sound files are kick_1.wav, kick_2.wav, kick_3.wav etc

but it doesn’t work with the wildcard.

2 If I want to batch process a couple of files in a directory and process/convert them to something else

And put the processed files in a new folder, how do I do that?

for %i in *.wav do sox "%i" -b 8 "n_%i" .flac

(also not sure of the conversion of the files when batching)

Best,

Sent from Mail for Windows 10

_______________________________________________

Sox-users mailing list

[email protected]

https://lists.sourceforge.net/lists/listinfo/sox-users

_______________________________________________
Sox-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sox-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.