Quantcast
Viewing all articles
Browse latest Browse all 13537

Log Parser Powershell - todays date in the file name

Hi,

 

I'm trying to use the log parser PowerShell template to look in a text file for a string.

 

I can get it to work on a file like the below.

 

logfile.log

 

but I cant work out how to add todays date into the script argument? As the system that creates the log file adds the date so every day its a new log file.

 

todays date is 17/10/2016

 

logfile2016-10-17.log

 

feel like it should be something like

 

c:\logfile$get-date format- yyyy-mm-dd.log, error502


Viewing all articles
Browse latest Browse all 13537

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>