获取当前文件夹所有文件名称列表:
DIR *.* /B >LIST.TXT
获取当前文件夹所有文件路径:
@echo off & setlocal EnableDelayedExpansion
for /f "delims=" %%i in (‘"dir /a/s/b/on *.*"‘) do (
set file=%%~fi
set file=!file:/=/!
echo !file! >> 路径.txt
)
时间: 2024-10-08 10:33:25
获取当前文件夹所有文件名称列表:
DIR *.* /B >LIST.TXT
获取当前文件夹所有文件路径:
@echo off & setlocal EnableDelayedExpansion
for /f "delims=" %%i in (‘"dir /a/s/b/on *.*"‘) do (
set file=%%~fi
set file=!file:/=/!
echo !file! >> 路径.txt
)