【问题标题】:Move 1000s of files on the go随时随地移动 1000 多个文件
【发布时间】:2014-04-07 11:43:01
【问题描述】:

我的本​​地机器上有超过 100,000 个文件。 文件名为file1.txt, file2.txt to file99999.txt, 我想将file1.txt to file25000.txt 的文件移动到其他位置,比如 Junks\file1.txt。

请告诉我如何使用 cmd 提示符或批处理使用正则表达式移动文件。任何帮助将不胜感激。

【问题讨论】:

    标签: windows batch-file cmd


    【解决方案1】:

    这应该在当前目录中创建一个Junks 文件夹,并将您描述的文件移动到Junks 文件夹中。

    删除& echo file %%a 以加快速度,但您不会看到任何屏幕输出。

    @echo off
    MD "Junks" 2>nul
    for /L %%a in (1,1,25000) do move "file%%a.txt" "Junks" >nul & echo file %%a
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多