批处理中的路径处理

set test_path=G:\aaa\bbb\ccc.xxxtest

for /f "delims=" %%a in ("%test_path%") do set file=%%~dpnxafile

d —— 磁盘im

p —— 路径文件

n —— 文件名磁盘

x —— 后缀名(带点)path

相关文章
相关标签/搜索