sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk>
To: sox-users@lists.sourceforge.net
Subject: Re: Chopping wav samples
Date: Fri, 20 Mar 2020 20:41:02 +0000	[thread overview]
Message-ID: <98a52aafd4c4fb1dddf2f68d613ef58f@wingsandbeaks.org.uk> (raw)
In-Reply-To: <lRjG5buel7kaPQteWtgv5V2iFrzzyiSQVQvmTVCLRbyfHB5uOOujLqIuXrIvE9PjhFTeQZvkTWmUD-q2EkWGIk9T-Z--BRzQgREDSU8oeF8=@protonmail.com>

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

  reply	other threads:[~2020-03-20 21:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20  9:37 Chopping wav samples K. H. Hom via Sox-users
2020-03-20 20:41 ` Jeremy Nicoll - ml sox users [this message]
2020-03-24  9:48   ` K. H. Hom via Sox-users
2020-03-24 14:01     ` Jeremy Nicoll - ml sox users
2020-03-29 14:27       ` K. H. Hom via Sox-users

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98a52aafd4c4fb1dddf2f68d613ef58f@wingsandbeaks.org.uk \
    --to=sox-users@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).