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-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,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 C540D1F55B for ; Thu, 28 May 2020 14:07:45 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jeJC4-0003TY-PR; Thu, 28 May 2020 14:07:36 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeJC3-0003TQ-TC for sox-users@lists.sourceforge.net; Thu, 28 May 2020 14:07:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding: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=ios2CRpt+RsxGP6lyx5htMgLm1eiw6UBOYymiIUdlOw=; b=frAm1aiNtssD2dXrUtix0PzLc Dw1D2Qo2C8vVGQ0MPQhyPsGsWZkWSkb8nD/OwJF4Er/ruHLqnoBIq7LGkImB6H0yYwaRlX09Ei3KK Ph3lz//uH1T0ZUR6cjl32FroFWH2vVr0JSq1U7fH8mi9eGcUjbSDNdAXMNNjiNDXgElPI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Sender:Reply-To:Cc:Content-Transfer-Encoding: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=ios2CRpt+RsxGP6lyx5htMgLm1eiw6UBOYymiIUdlOw=; b=FOmyR357JCFZ6SsDCGWb22JHh6 gnHiC5y3n4ph/AsJvLPzHLkT6/AEFBj8PgJz6jWfzJ+H/bqSefpAoEnj7kGpH4QLilk6dPJRBwVb7 HCGg7U+cHe9/q+BStmC7hi7SrpMIu6AMsolCoReOibZBYat5lQhbwyVcGH2FOPXy4UHs=; Received: from mail-wm1-f41.google.com ([209.85.128.41]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1jeJC2-001Zme-As for sox-users@lists.sourceforge.net; Thu, 28 May 2020 14:07:35 +0000 Received: by mail-wm1-f41.google.com with SMTP id l26so3287868wme.3 for ; Thu, 28 May 2020 07:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ios2CRpt+RsxGP6lyx5htMgLm1eiw6UBOYymiIUdlOw=; b=FFpGWK+lp5Pzg7ywTo1oeLFqXuOillAXlcXBOkz4IKM824zHSuhYfpdtOY3CTwSaMU kQG7frDx3wDx5co22VK9DO7vVL9deEed0oxCDrVLrIFPiP3/G0KedGWRRRGThmezicO3 W3X4Sz7BHP9A5XbxzFKfnTtKoKXA5L0h6UCBy+mYIuymvi9lZ2AEHlB+vXk7ODJFTpjc LRKubMWoIWOSM1B1jugtc4/wmrwjoW8dgtzlRKUeey9VaOTGUUh97D+Q/9HvTfD4qUjJ r3O7i4D2ZwPVq1mghvTB+hCYlQN1NBD4FJcwnhfbKGTVqab2SmOOYyYmD/m9jfSlbXdv zXyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ios2CRpt+RsxGP6lyx5htMgLm1eiw6UBOYymiIUdlOw=; b=hISZMcbDk/OGIUFi6tHzm6L97BUuoHVX2T0lFOabb0dG95X+hKGLOAndPoOSPzFgca GDMerSBFSC/+9pb+gRgD+eI6+Nc4t8zbW9A3QBWVlK54HorwleizkwK9gPImgQ+UPV8v Jpq0OMzY1sKEPjiM5k1ih8fJIUJ9iljP+FaXNLNtmxz3LFgIedeOgCEV8vxS7zT4MpxZ cIBSlrLHNAyeX4s6vWS1j1ZygXAuhYIvUcMgucUdwqF9v5ERW1dHupRB4j1yKINK2yyu HI+8eijGiqqArGFmwal98IiRvz2nZznuSHfsbaxPigjFgfOfX6qmXRZNqiPS7dRu8TVL ORWQ== X-Gm-Message-State: AOAM530R+nL4le06MPgALWSbMn30cvy9026LB2V0xgtocA8PoHxvmw/w fYRo/W80pLzIfjPONvVL0DSmvNExBzdBpihHAugsuJs= X-Google-Smtp-Source: ABdhPJybReFd7+rhs9+P2jUHjRHZ3tTSXxkSwSa2iqwY2hfOAAJIO88Ph7p+7PQdOtooGi//RwwRgoimEblOSZX2tuk= X-Received: by 2002:a1c:1902:: with SMTP id 2mr3572219wmz.178.1590674847761; Thu, 28 May 2020 07:07:27 -0700 (PDT) MIME-Version: 1.0 References: <173dc6c3-ff96-e8b7-a072-3d3f84220e5d@bayern-mail.de> <13d91385-87d0-635e-aa10-5a0cdbe11b50@web.de> In-Reply-To: <13d91385-87d0-635e-aa10-5a0cdbe11b50@web.de> From: Jeff Learman Date: Thu, 28 May 2020 10:07:16 -0400 Message-ID: To: sox-users@lists.sourceforge.net X-Headers-End: 1jeJC2-001Zme-As Subject: Re: BatchProcessing Files on Windows 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-Type: multipart/mixed; boundary="===============8485939524564027563==" Errors-To: sox-users-bounces@lists.sourceforge.net --===============8485939524564027563== Content-Type: multipart/alternative; boundary="000000000000410c5a05a6b5d9e6" --000000000000410c5a05a6b5d9e6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable %%~Ni returns the base filename (without directory or extension) for %%i, if %%i is the index in a FOR loop. See https://stackoverflow.com/questions/3432851/dos-bat-file-equivalent-to-unix= -basename-command for more info. Look at the second answer down, which has a list for what "%~xi" does for different letters x. Apparently it's case-insensitive. Also, the for is different in a batch file than on the command line, "%%" versus "%", see https://stackoverflow.com/questions/14509652/what-is-the-difference-between= -and-in-a-cmd-file for the reason. (I'll just add that to the list of reasons I dislike Windows command line. But the main reason is I'm more used to sh/ksh/bash.= ) On Thu, 28 May 2020 at 01:36, tsepp2000@web.de wrote: > If the place of Sox is "C:\Program Files (x86)\Sox\sox.exe", you could > also start your command in your wav-folder: > > FOR %F IN (*.wav) DO "C:\Program Files (x86)\Sox\sox.exe" "%F" -b 8 > "%~NF.aiff" > > or > > FOR %F IN (*.wav) DO "C:\Program Files (x86)\Sox\sox.exe" "%F" -b 8 > "processedfolder\%~NF.flac" > > *.cmd means a batch file. I have attached such a file ("command.txt"): > - copy it inside your wav-folder > - if necessary do any changes > - inside a cmd-file you need double "%" > - rename it to "command.cmd" and make a double-click :-) > > Regards > Thomas > > > Am 27.05.2020 um 15:33 schrieb Nils Wallgren: > > I have my sox.exe in in my Program Files (x86). What I always do is 1) > > open the folder that contains the audiofiles, write the =E2=80=9Ccmd=E2= =80=9D in the > > address field > > > > 2) set the audiodriver=3Dwaveaudio > > > > 3) then I use sox/play/rec > > > > I don=E2=80=99t know any other way to work. > > > > Sorry. But when you write *.cmd I am not really sure where to run this > > command. > > > > I tried my workprocess with FOR %F IN (*.wav) DO sox.exe "%F" -b 8 > > "processedfolder\%~NF.flac" and it works > > > > But not really sure what the ~NF is short for. > > > > If I work within the folder of Sox I also need to place the audiofiles > > in this folder too. > > > > Sent from Mail for > > Windows 10 > > > > *From: *tsepp2000@web.de > > *Sent: *Wednesday, 27 May 2020 14:31 > > *To: *Nils Wallgren > > *Cc: *sox-users@lists.sourceforge.net > > > > *Subject: *Re: [SoX-users] BatchProcessing Files on Windows > > > > This is a fake sox-path :-) You must use ure own path!!! Where is your > > sox. exe? Or do you start the batch file or command inside the folder o= f > > Sox, where the sox.exe is? > > > > This should work - commandline (if you have flac inside): > > FOR %F IN (*.wav) DO sox.exe "%F" -b 8 "%~NF.flac" > > > > Or in a *.cmd: > > FOR %%F IN (*.wav) DO sox.exe "%%F" -b 8 "%%~NF.flac" > > > > Regards > > Thomas > > > > Am 27.05.2020 um 11:48 schrieb Nils Wallgren: > > > > =E2=80=9CC:\sox.exe"' is not recognized as an internal or external = command=E2=80=9D > > > _______________________________________________ > Sox-users mailing list > Sox-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sox-users > --000000000000410c5a05a6b5d9e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
%%~Ni returns the base filename (without directory or= extension) for %%i, if %%i is the index in a FOR loop.=C2=A0 See https://stackoverflow.com/questions/3432851/dos-bat-= file-equivalent-to-unix-basename-command for more info.=C2=A0 Look at t= he second answer down, which has a list for what "%~xi" does for = different letters x.=C2=A0 Apparently it's case-insensitive.=C2=A0 Also= , the for is different in a batch file than on the command line, "%%&q= uot; versus "%", see https://stack= overflow.com/questions/14509652/what-is-the-difference-between-and-in-a-cmd= -file for the reason.=C2=A0 (I'll just add that to the list of reas= ons I dislike Windows command line.=C2=A0 But the main reason is I'm mo= re used to sh/ksh/bash.)

On Thu, 28 May 2020 at 01:36, tsepp2000@web.de <tsepp2000@web.de> wrote:
If the place of Sox is "C:\Program Files (x86)\= Sox\sox.exe", you could
also start your command in your wav-folder:

FOR %F IN (*.wav) DO "C:\Program Files (x86)\Sox\sox.exe" "%= F" -b 8
"%~NF.aiff"

or

FOR %F IN (*.wav) DO "C:\Program Files (x86)\Sox\sox.exe" "%= F" -b 8
"processedfolder\%~NF.flac"

*.cmd means a batch file. I have attached such a file ("command.txt&qu= ot;):
- copy it inside your wav-folder
- if necessary do any changes
- inside a cmd-file you need double "%"
- rename it to "command.cmd" and make a double-click :-)

Regards
Thomas


Am 27.05.2020 um 15:33 schrieb Nils Wallgren:
> I have my sox.exe in in my Program Files (x86). What I always do is 1)=
> open the folder that contains the audiofiles, write the =E2=80=9Ccmd= =E2=80=9D in the
> address field
>
> 2) set the audiodriver=3Dwaveaudio
>
> 3) then I use sox/play/rec
>
> I don=E2=80=99t know any other way to work.
>
> Sorry. But when you write *.cmd I am not really sure where to run this=
> command.
>
> I tried my workprocess with FOR %F IN (*.wav) DO sox.exe "%F"= ; -b 8
> "processedfolder\%~NF.flac" and it works
>
> But not really sure what the ~NF is short for.
>
> If I work within the folder of Sox I also need to place the audiofiles=
> in this folder too.
>
> Sent from Mail <https://go.microsoft.com/fw= link/?LinkId=3D550986> for
> Windows 10
>
> *From: *tsepp200= 0@web.de <mailto:tsepp2000@web.de>
> *Sent: *Wednesday, 27 May 2020 14:31
> *To: *Nils Wallgren <mailto:affarer@hotmail.com>
> *Cc: *sox-users@lists.sourceforge.net
> <mailto:sox-users@lists.sourceforge.net>
> *Subject: *Re: [SoX-users] BatchProcessing Files on Windows
>
> This is a fake sox-path :-) You must use ure own path!!! Where is your=
> sox. exe? Or do you start the batch file or command inside the folder = of
> Sox, where the sox.exe is?
>
> This should work - commandline (if you have flac inside):
> FOR %F IN (*.wav) DO sox.exe "%F" -b 8 "%~NF.flac"=
>
> Or in a *.cmd:
> FOR %%F IN (*.wav) DO sox.exe "%%F" -b 8 "%%~NF.flac&qu= ot;
>
> Regards
> Thomas
>
> Am 27.05.2020 um 11:48 schrieb Nils Wallgren:
>
>=C2=A0 =C2=A0 =C2=A0=E2=80=9CC:\sox.exe"' is not recognized as= an internal or external command=E2=80=9D
>
_______________________________________________
Sox-users mailing list
Sox-us= ers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/s= ox-users
--000000000000410c5a05a6b5d9e6-- --===============8485939524564027563== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8485939524564027563== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sox-users mailing list Sox-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-users --===============8485939524564027563==--