右键打开右键菜单,新建一个文本文档;
把文本文档的.txt后缀改成.cmd或者.bat。比如把“新建文本文档.txt”改成“test.bat”;
在弹出的对话框中点击确定;
右键点击test.bat,在弹出的菜单中点击编辑;
输入如下命令:
===================================
@echo off & setlocal EnableDelayedExpansion
for /f "delims=" %%i in ('"dir /a/s/b/on *.*"') do (
set file=%%~fi
set file=!file:/=/!
echo !file! >> 路径.txt
)