生成C:\Users\pactera\Desktop\Test目录下所有文件路径(带引号)写入1.txt文件
for /f “delims=” %%i in (‘dir /s /b C:\Users\pactera\Desktop\Test’) do echo,"%%i">>C:\Users\pactera\Desktop\Test\1.txt
结果展示:
“C:\Users\pactera\Desktop\Test\replace.bat”
“C:\Users\pactera\Desktop\Test\replace2.bat”
“C:\Users\pactera\Desktop\Test\replace3.bat”
“C:\Users\pactera\Desktop\Test\replace4.bat”
“C:\Users\pactera\Desktop\Test\test.bat”
“C:\Users\pactera\Desktop\Test\test.ctl”