本文整理自网络,侵删。
转换前:C:\Users\zhangshuai\Desktop\codesnip-develop\codesnip-develop转换后:C:\Users\ZhangSH~1\Desktop\CODESN~1\CODESN~1
function LongToShortFilePath(const LongName: string): string;begin SetLength(Result, MAX_PATH); SetLength(Result, GetShortPathName(PChar(LongName), PChar(Result), MAX_PATH));end;
相关阅读 >>
Delphi Delphi中点击dbgrid某一行获得其详细数据方法
Delphi Delphi tparallel cleanup needed用法
Delphi 10.3 开发app 在android手机上获取imei
Delphi将n个相同字符提取到左边,m个相同字符提取到右边
更多相关阅读请进入《Delphi》频道 >>