Re: Chopping wav samples

"K. H. Hom via Sox-users" <[email protected]>
Newsgroups gmane.comp.audio.sox
Message-ID <EB_IEhlQciagoNzcakNr9Tkiy7Kj3kKMfk1Je6lFfhTOyvrGObhNmwyXnsN81kuzWrQY6KqL9ts8V9Sw73kJQemSHXcHPTqF5AtblK7IRZw=@protonmail.com>

Thank you for the reply.


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Am Freitag, März 20, 2020 9:41 PM schrieb Jeremy Nicoll - ml sox users <[email protected]>:

> On 2020-03-20 09:37, K. H. Hom via Sox-users wrote:
>
> > Hi,
> > when i navigate to the folder with the source file and manually
> > execute the following command it works:
> > sox threebursts.wav temp_outfile.wav silence 1 0.1 1 : newfile :
> > restart
> > but if I craete a batch file which takes teh file as argument, it doent
> > work:
> > sox "%~1" temp_outfile.wav silence 1 0.1 1% 1 0.1 1% : newfile :
> > restart
> > it results into :
> >
> > > sox "C:\Users\hom\Downloads\Desktop\New folder (3)\threebursts.wav"
> > > temp_outfile.wav silence 1 0.1 1 : newfile : restart
> >
> > Any idea why that do not work please?
>
> A % sign has special meaning in bat files. Look - you used "%~1" - and
> expected that
> to be replaced by a parameter. Well, further along the command the
> other % chars
> caused a problem.
>
> You need to use %% where you want a single one. See: "Quoting and
> escaping" at:
>
> https://en.wikibooks.org/wiki/Windows_Batch_Scripting#How_a_command_line_is_interpreted

Yeah I know and the manual says :
"
The command-line arguments AKA command-line parameters passed to a batch script are accessible as %1, %2, ..., %9.
"
as well as "%~1" search the doc ...

When dragging a file on the the bat file , the %~1 with be replaced with the path to the file as mentioned in my first post. But that wasnt the question. It works , try it.

So "%~1" becomes  "C:\Users\hom\Downloads\Desktop\New folder (3)\threebursts.wav"

The question is now wht is this command not working:

sox "C:\Users\hom\Downloads\Desktop\New folder (3)\threebursts.wav" temp_outfile.wav silence 1 0.1 1 : newfile : restart


Cheers H

>
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Jeremy Nicoll - my opinions are my own
>
> 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
firefox_KvOQ4GMyhG.png (image/png, 14.9 KB) - not displayed
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.