DOS批处理命令中的for语句

建立1000个文件夹:
for /L %c in (1,1,1000) do md d:\pop%c

相对于,建立TXT文件就是:
for /L %c in (1,1,1000) do type d:\1.txt >>d:\pop%c.txt

删除1000个文件夹就是:
for /L %c in (1,1,1000) do rd d:\pop%c

删除TXT文件就是:
for /L %c in (1,1,1000) do del d:\pop%c.txt

This entry was posted in Technology. Bookmark the permalink. 6,751 views

Related Posts

One Response to DOS批处理命令中的for语句

  1. easy says:

    强 ,没事的话我就 去 建立一千个 文件夹去耍.
    for 还有很多用法,比较强大.

Leave a Reply

Your email address will not be published. Required fields are marked *