Get full path and long file name from short file name

前端 未结 10 761
故里飘歌
故里飘歌 2020-12-15 09:13

I have an nice console file manager (eXtreme by Senh Liu), it passes short path/filenames as variables to a menu.bat.

How can I generate a full folder name + long fi

10条回答
  •  轮回少年
    2020-12-15 09:33

    My solution:

    set shortname=P:\MYPROG~1\SHELLS\ZBACKUP\REFSTO~1.BAL
    for /F %f in ('dir /b /s %shortname%') do where /R %~dpf %~nf%~xf
    

    if you use it in a batch file:

    for /F %%f in ('dir /b /s %shortname%') do where /R %%~dpf %%~nf%%~xf
    

提交回复
热议问题