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