C# - Easiest way to parse filename with spaces eg. “C:\Test\File with spaces.txt”

前端 未结 6 2218
孤独总比滥情好
孤独总比滥情好 2021-01-04 23:30

I am trying to pass a full file path to FFMPEG.

C:\\TestFolder\\Input\\Friends - Season 6 - Gag Reel.avi

and it\'s obviously not liking th

6条回答
  •  自闭症患者
    2021-01-04 23:54

    All files have a short pathname that is DOS 8.3 compatible. The only way to get that filename is GetShortPathName. The best explanation I can find is at the following address:

    http://www.pinvoke.net/default.aspx/kernel32.GetShortPathName

提交回复
热议问题