本帖最后由 yhcfsr 于 2019-2-3 17:19 编辑
看到楼主说不要powershell我就放心了,所以我特意写了一段powershell代码.
食用方法:保存为bat执行.- @echo off
- powershell -NoProfile -NoLogo -command "& {$str='%~dp0';$str;$str=$str.ToCharArray();$result=@(foreach($char in $str){\"\u{0:x4}\" -f [int]$char});$result -join '';}"
- pause
复制代码 测试结果:- C:\Users\CF\Desktop\
- \u0043\u003a\u005c\u0055\u0073\u0065\u0072\u0073\u005c\u0043\u0046\u005c\u0044\u0065\u0073\u006b\u0074\u006f\u0070\u005c
复制代码
|