Search code examples
filenamesspace

File name parsing issue with space c#


i am trying to merge two wave file using sox.exe.

when i am specifying small path then it is working but when i am giving big path with space in it then i am getting no error but no file is getting generated. i got a tips from this url C# - Easiest way to parse filename with spaces eg. "C:\Test\File with spaces.txt"

but the above one did not work.

here i am giving few code that how my code look like

-m C:\Users\tridip.BBAKOLKATA\Documents\Visual Studio 2010\Projects\CSRAssistant\CSRAssistant\bin\Debug\VoiceRecords\in.wav 
C:\Users\tridip.BBAKOLKATA\Documents\Visual Studio 2010\Projects\CSRAssistant\CSRAssistant\bin\Debug\VoiceRecords\capture.wav 
C:\Users\tridip.BBAKOLKATA\Documents\Visual Studio 2010\Projects\CSRAssistant\CSRAssistant\bin\Debug\VoiceRecords\_20140506020037.wav

C:\Users\tridip.BBAKOLKATA\Documents\Visual Studio 2010\Projects\CSRAssistant\CSRAssistant\sox.exe and the above path as follows


Solution

  • Put all your path between ""

    -m "C:\Users\tridip.BBAKOLKATA\Documents\Visual Studio 2010\Projects\CSRAssistant\CSRAssistant\bin\Debug\VoiceRecords\in.wav" 
    "C:\Users\tridip.BBAKOLKATA\Documents\Visual Studio 2010\Projects\CSRAssistant\CSRAssistant\bin\Debug\VoiceRecords\capture.wav"
    "C:\Users\tridip.BBAKOLKATA\Documents\Visual Studio 2010\Projects\CSRAssistant\CSRAssistant\bin\Debug\VoiceRecords\_20140506020037.wav"