【问题标题】:movy files that contain string or start with string包含字符串或以字符串开头的movy文件
【发布时间】:2014-05-21 21:22:38
【问题描述】:

我希望从包含许多 .txt 文件的文件夹中移动 .txt 文件。

但只有以字符串“settlement-id”开头或包含“settlement-id”的 .txt 文件。

最好是 .bat 文件。

【问题讨论】:

  • move *settlement-id*.txt \destination

标签: file batch-file file-io copy xcopy


【解决方案1】:

一种方法:

@echo off
for /f "delims=" %%a in ('dir *.txt /b/a-d ^| find /i "settlement-id") do copy "%%a" "YOUR_PATH"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-14
    • 2014-12-02
    • 2020-11-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多