This may be simple question, but I am new to Powershell and could not find a way to do it. Basically, I have to run a bat process if a specified file does not exist. The file name is in a patten like "mmddyyy.dat" in a folder, where mmddyyyy is today's month, day(0 prefix if < 10) and year. Pusdo codes would be something like this:
$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?
By the way, any good site with example or tutorial information about PowerShell?