Re: Chopping wav samples

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

 



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



--
Jeremy Nicoll - my opinions are my own


_______________________________________________
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