Question

I have a question about using Sox. I need to mix many audio files and every file has it's own specific time when it should be added. I'm using piping and everything goes fine until I need to grab files with absolute paths with spaces in folder names. In this case I need to use double quotes twice (in path and to allocate piping). Here's example:

-m "initial.wav" "|sox "path with spaces\file1.mp3" -p pad 8.52 0" "|sox "another path with spaces\file2.mp3" -p pad 19.07 0" "|sox "file3.mp3" -p pad 36.52 0" "output.mp3"

And of course these quotes around file paths ruin command. How can I fix this? Maybe it's possible to use single quotes somehow or maybe I'm missing something obvious...

Will may be useful to add that I'm runing sox from C# app, thus everything happens in Windows.

Was it helpful?

Solution

Usually, it is possible to escape the inner double quotes somehow. (Most?) *nix shells use the backslash for that purpose, i.e. you would write ... "|sox \"path with spaces/file1.mp3\" ...". Of course, Windows uses the backslash for different purposes (delimiting path components), so there may be a slightly different way to escape quotes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top