windows:从.txt读取项目,并为找到的每个项目创建空文件

时间:2014-10-07 20:21:34

标签: windows batch-file dos

请考虑包含以下内容的input.txt文件:

C0001.MXF
C0002.MXF
C0003.MXF
C0004.MXF
C0005.MXF
C0006.MXF
C0007.MXF
...
C9999.MXF

我想做一个批处理,对于每个CXXXX.MXF项目在c:\ folder 中创建一个空文件CXXXX.TXT谢谢

1 个答案:

答案 0 :(得分:0)

这应该做你想要的:

@echo off
for /F "tokens=1 delims= " %%f in (input.txt) do (copy nul c:\folderD\%%f /y > nul & @echo Creating File %%f )