windows路径缩写

来源:百度知道 编辑:UC知道 时间:2024/09/21 03:18:56
C:\Documents and Settings\All Users\Application Data\Tencent\QQDisk

想让CMD在以上路径运行但是系统本身的路径通常是在其他目录

所以需要把上面的缩写如:C:\Documents and Settings\在命令中缩写成C:\Docume~1
上面整个路径不会,希望高手指点...没用的信息不要乱给我贴--谢谢
一楼的你太不厚道了吧

C:\DOCUME~1\ALLUSE~1\APPLIC~1\Tencent\QQDisk

我教你怎么取,这是我取路径的delphi源代码.不知道你能不能看懂...如果会编程应该能看懂吧,不会也没关系

var s: string;
begin
SetLength(s, MAX_PATH);
GetShortPathName('C:\Documents and Settings\All Users\Application Data\Tencent\QQDisk', PChar(s), MAX_PATH);
edit1.Text := StrPas(PChar(s));

%systemroot%