Re: Chopping wav samples

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Thank you for the reply.


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
Am Freitag, März 20, 2020 9:41 PM schrieb Jeremy Nicoll - ml sox users <jn.ml.sxu.88@xxxxxxxxxxxxxxxxxxxx>:

> 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
> Sox-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/sox-users


Attachment: firefox_KvOQ4GMyhG.png
Description: PNG image

_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users

[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux