From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6130 216.105.38.0/24 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 839F91F619 for ; Fri, 20 Mar 2020 21:20:39 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jFP49-00069a-05; Fri, 20 Mar 2020 21:20:29 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jFP47-00069N-PK for sox-users@lists.sourceforge.net; Fri, 20 Mar 2020 21:20:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Message-ID:References:In-Reply-To:Subject:To:From: Date:Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8Pv5sjbYzXgnK0vA0ljel28yeE57PCTJCTiYlpNvn8w=; b=PYuAlfLy2dQT484wrclVo3XjCu 76ftnIS3NHrf4ciAxNSaIW29/nROLR7x4is579uWCvotgsMSPulbU0FdCpdcDLUskfOq0pJSo/y5+ LcWDJmyQEdOUE2BJEasj16MLpp+YJEIQN1yzV3GLyZSyo49jz34hNBdDAHCa6oPNGOOA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Message-ID:References:In-Reply-To:Subject:To:From:Date: Content-Transfer-Encoding:Content-Type:MIME-Version:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=8Pv5sjbYzXgnK0vA0ljel28yeE57PCTJCTiYlpNvn8w=; b=ZVw43SxubKIS1n/ifU43ePXHkV oqRC8ik38bjdhFYs1tJtvPDgEDPXlPEyf+MSGj57rbOiA7rvcWB3S1CpandlRcnWEoNxvrNrzz29q qxOwgQvoOvXE4N+KJdNsfxE++ws+Y5xWATM4T0DUDLLcplEy71Y29RZtQn/mCsIAhFm8=; Received: from authenticated.a-painless.mh.aa.net.uk ([90.155.4.48]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jFP45-00FgIy-BT for sox-users@lists.sourceforge.net; Fri, 20 Mar 2020 21:20:27 +0000 Received: from a-webmail.thn.aa.net.uk ([2001:8b0:62::22] helo=webmail.aa.net.uk) by a-painless.mh.aa.net.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jFOSA-0006Af-M2 for sox-users@lists.sourceforge.net; Fri, 20 Mar 2020 20:41:14 +0000 Received: from cpc132346-sgyl43-2-0-cust166.know.cable.virginm.net ([82.42.23.167]) by webmail.aa.net.uk with HTTP (HTTP/1.1 POST); Fri, 20 Mar 2020 20:41:02 +0000 MIME-Version: 1.0 Date: Fri, 20 Mar 2020 20:41:02 +0000 From: Jeremy Nicoll - ml sox users To: sox-users@lists.sourceforge.net In-Reply-To: References: Message-ID: <98a52aafd4c4fb1dddf2f68d613ef58f@wingsandbeaks.org.uk> X-Sender: jn.ml.sxu.88@wingsandbeaks.org.uk User-Agent: Roundcube Webmail/1.3.10 X-Headers-End: 1jFP45-00FgIy-BT Subject: Re: Chopping wav samples X-BeenThere: sox-users@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-users@lists.sourceforge.net Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: sox-users-bounces@lists.sourceforge.net 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