标准的方式来转换为.NET短路径 [英] standard way to convert to short path in .net
本文介绍了标准的方式来转换为.NET短路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
寻找标准错误,校对的方式转换成长名称,如C:\ Documents和设置为等效的短名称C:\ DOCUME〜1
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"
我需要这个从withing我的C#应用程序运行外部程序。它失败,如果我给它用在长名称的路径。
I need this to run an external process from withing my C# app. It fails if I feed it with paths in the "long name".
推荐答案
请问,即使你用引号将长文件路径的外部进程失败?这可能是一个简单的方法,如果外部应用程序支持它。
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.
例如。
myExternalApp "C:\Documents And Settings\myUser\SomeData.file"
这篇关于标准的方式来转换为.NET短路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文