【发布时间】:2019-05-23 14:26:17
【问题描述】:
我正在尝试创建一个备份脚本,该脚本将移动 30 天以前的文件,但我希望能够从列表中排除文件夹
$a = "C:\\Temp\\Exclude\\test"
$b = "C:\\Temp\\Exclude"
如果我运行以下命令:
$a -match $b
关注PowerShell Basics: Conditional Operators -Match -Like -Contains & -In -NotIn:
$Guy ="Guy Thomas 1949"
$Guy -match "Th"
这将返回true。
【问题讨论】:
标签: powershell string-comparison