【发布时间】:2021-08-20 09:31:18
【问题描述】:
我有以下问题,如果我能在这方面得到一些帮助,我将不胜感激。我不断地将 xml 文件流放到一个文件夹中。 XML 文件名可能如下所示。它只上升到 1005。
1001.order-asdf1234.xml
1002.order-asdf4321.xml
我想将文件分类到不基于文件名的唯一命名文件夹中。一个例子是
C:\Directory Path...\Peter (All files starting with 1001 go in there)
C:\Directory Path...\John (All files starting with 1002 go there)
如何创建批处理或 powershell 脚本以将文件连续分类到指定文件夹中?由于我只有 5 个文件夹,我想简单地为每个文件夹指定目标文件夹,并且没有复杂的循环,但我不知道该怎么做。
【问题讨论】:
标签: windows powershell directory