standard way to convert to short path in .net

前端 未结 3 1828
眼角桃花
眼角桃花 2021-01-18 04:41

looking for the standard bug-proofed way to convert \"long names\" such as \"C:\\Documents and settings\" to their equivalent \"short names\" \"C:\\DOCUME~1\"

I need

3条回答
  •  深忆病人
    2021-01-18 05:30

    Does the external process fail even if you enclose the long file paths in quotes? That may be a simpler method, if the external app supports it.

    e.g.

    myExternalApp "C:\Documents And Settings\myUser\SomeData.file"
    

提交回复
热议问题