批處理中的路徑處理

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

相關文章
相關標籤/搜索