Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: SOX: How to specify the input folder ? (Read 2275 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

SOX: How to specify the input folder ?

I have a trouble with my SOX script.
It works like a charm as drag and drop.
But drag and drop in windows have some limitations and I can't drop my entire set of samples that I want to process.
I want to make an "input" folder in SOX directory , drag all files in to that input folder and than run the bat file for conversion.

My script looks like this:

cd %~dp0
mkdir converted
FOR %%A IN ("%~dp0/input") DO sox %%A "converted/%%~nxA" reverse silence 1 1 -40.0d reverse silence 1 1 -40.0d gain -n -1
pause

It gives me the : 

FAIL formats: can't open input file `D:\Projekty\Audio\Soft\UTILITIES\sox-14
.4.1\input': Permission denied

There are no read only files in that folder, and I am the admin user on my windows, so it should work.
Any ideas what I'm doing wrong and how to fix it ?

 

SOX: How to specify the input folder ?

Reply #1
Try this:
FOR %%A IN ("%~dp0input\*") DO [... commands here ...]