【发布时间】:2017-02-16 01:23:59
【问题描述】:
这可能是一个简单的问题,但我是 PowerShell 新手,找不到解决方法。基本上,如果指定的文件不存在,我必须运行一个 .BAT 文件。文件名位于文件夹中的“mmddyyy.dat”之类的模式中,其中 mmddyyyy 是今天的月份、日期(如果
$File = "C:\temp\*mmddyyyy*.dat" # how to parse Get-Date mmddyyyy and build this pattern?
#if $File exist # check any file exist?
.\myBatch.bat # run the bat file, can I run it in hidden mode?
【问题讨论】:
标签: powershell