From: Nils Wallgren <affarer@hotmail.com>
To: "sox-users@lists.sourceforge.net" <sox-users@lists.sourceforge.net>
Subject: Re: BatchProcessing Files on Windows
Date: Fri, 29 May 2020 12:24:11 +0000 [thread overview]
Message-ID: <HE1PR0102MB32252AF5812C1D010E2A2B4AAA8F0@HE1PR0102MB3225.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <CAGyjer7t4ueM11rLbZP_iNZ3h+ost68rk-RjVEQQ6KCESiCauw@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 4269 bytes --]
Thanks so much for the help. I guess a lot of the things were kind of basic and made it confusing what I was asking for. I am really glad I got it to work
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Jeff Learman<mailto:jjlearman@gmail.com>
Sent: Thursday, 28 May 2020 16:19
To: sox-users@lists.sourceforge.net<mailto:sox-users@lists.sourceforge.net>
Subject: Re: [SoX-users] BatchProcessing Files on Windows
BTW, if you have more Windows cmd issues, I highly recommend joining and asking at http://stackoverflow.com which is a better place for generic questions. Of course, at first you didn't know whether your issues were sox issues (and one of them was.) Just pointing out a great resource for that kind of question. They can also answer sox questions there.
On Thu, 28 May 2020 at 10:07, Jeff Learman <jjlearman@gmail.com<mailto:jjlearman@gmail.com>> wrote:
%%~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<mailto:tsepp2000@web.de> <tsepp2000@web.de<mailto: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 “cmd” in the
> address field
>
> 2) set the audiodriver=waveaudio
>
> 3) then I use sox/play/rec
>
> I don’t 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/fwlink/?LinkId=550986> for
> Windows 10
>
> *From: *tsepp2000@web.de<mailto:tsepp2000@web.de> <mailto:tsepp2000@web.de<mailto:tsepp2000@web.de>>
> *Sent: *Wednesday, 27 May 2020 14:31
> *To: *Nils Wallgren <mailto:affarer@hotmail.com<mailto:affarer@hotmail.com>>
> *Cc: *sox-users@lists.sourceforge.net<mailto:sox-users@lists.sourceforge.net>
> <mailto: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"
>
> Regards
> Thomas
>
> Am 27.05.2020 um 11:48 schrieb Nils Wallgren:
>
> “C:\sox.exe"' is not recognized as an internal or external command”
>
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net<mailto:Sox-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/sox-users
[-- Attachment #1.2: Type: text/html, Size: 8141 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
[-- Attachment #3: Type: text/plain, Size: 158 bytes --]
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
next prev parent reply other threads:[~2020-05-29 12:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 22:30 BatchProcessing Files on Windows Nils Wallgren
2020-05-27 0:21 ` Jeff Learman
2020-05-27 8:09 ` Nils Wallgren
[not found] ` <173dc6c3-ff96-e8b7-a072-3d3f84220e5d@bayern-mail.de>
2020-05-27 8:34 ` tsepp2000
2020-05-27 9:48 ` Nils Wallgren
2020-05-27 12:31 ` tsepp2000
[not found] ` <HE1PR0102MB3225333E72970AB67FB1D914AAB10@HE1PR0102MB3225.eurprd01.prod.exchangelabs.com>
2020-05-28 5:35 ` tsepp2000
2020-05-28 14:07 ` Jeff Learman
2020-05-28 14:17 ` Jeff Learman
2020-05-29 12:24 ` Nils Wallgren [this message]
2020-05-28 5:53 ` tsepp2000
2020-05-27 12:50 ` Jeff Learman
2020-05-27 12:55 ` Jeff Learman
2020-05-27 12:20 ` Måns Rullgård
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=HE1PR0102MB32252AF5812C1D010E2A2B4AAA8F0@HE1PR0102MB3225.eurprd01.prod.exchangelabs.com \
--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).