gpt4 book ai didi

powershell - 复制项目将2条语句合并为1条

转载 作者:行者123 更新时间:2023-12-03 00:51:47 25 4
gpt4 key购买 nike

如何在Powershell中将此命令放入一条语句中?

copy-item $temp\tst1.cms $orig
copy-item $temp\tst2.cms $orig

如果名称不是连续的怎么办?喜欢
oadmrwc.cms
oadmrwn.cms

我正在尝试将批处理脚本转换为Powershell脚本

最佳答案

这样的事情应该起作用(使用Get-Childitem的通配符blobing)

Get-Childitem $temp\tst[12].cms | Copy-Item $orig

要么:
 Get-Childitem $temp\oadmrw[cn].cms | Copy-Item $orig

关于powershell - 复制项目将2条语句合并为1条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23762964/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com