1

I just moved from xp-32bit to W7 64bit and re-installed sox which I use to resample and create spectrogams. The batch-file

cd %~dp0

mkdir converted

FOR %%A IN (%*) DO sox %%A -n spectrogram -o "converted/spectro/%%~nxA.png"

pause

which worked fine with XP produce now an error saying that "sox" is not a valid command. The line

mkdir converted

works fine and the folder is created but "sox" gives an error. Actually with XP the folder was created in the sox folder and now it is created in the same folder as the data to be modified. I browsed this site and found something (I can't seem to find the precise post again) about adding a line under environmental variables, which I did. I added

sox C:\Program Files (x86)\sox-14-4-1\

in the system and user variables, with no success.

My user on the computer is listed as administrator Does anyone have a suggestion about modifying the batch files or configuring my system to get sox working?

1 Answer 1

0

Sounds like there may be a problem with the system path environmental variable entry.

Right-click My Computer and click Properties. In the System Properties window, click on the Advanced tab. In the Advanced section, click the Environment Variables button.

In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button. Add the path:

;C:\Program Files (x86)\sox-14-4-1; as the end entry. Don't delete anything else although you can delete your previous entry for sox if present.

Don't inlcude the word sox and ensure there is a single semi-colon in front of the entry and another after it (although the ending semi-colon is optional).

1
  • Neither you or the OP mentions exactly which environment variable you are talking about, but isn't it rather likely (from the error message) that sox.exe is not in PATH and so you should probably mention that the sox path should be added to that variable (from the OPs post I understand that he has made a variable sox instead...
    – zagrimsan
    Aug 5, 2016 at 6:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .