我如何重新使用我的通配符比赛?

How do I re-use my wildcard match?

需要使用 Windows 命令提示符完成一些高级文件移动;可以使用通配符吗?

在 UNIX 中使用正则表达式,我可以做这样的事情来找到所有以 "s" 开头的文件,然后用它们做一些其他事情 (echo)。

ls s(.*) ; echo Found file  , needs to be moved to C:\unicorns\()

我想在 Windows 命令提示符中做类似的事情:

:: find all files that begin with "s" and then do something else with them (echo)
dir s(*) ; echo Found file 

做这样的事情:

for %%f in (*) do (echo %%f)

这将回显在当前目录中找到的文件列表。 查找更多描述 here