free780 Posted November 9, 2017 Posted November 9, 2017 Hi I'm struggling with trying to select a filename from a full path using regex in powershell. Anybody know what it is?
Steve21 Posted November 9, 2017 Posted November 9, 2017 Does it have to be regex? There's default built in option of path and leaf to do that already As an example Split-Path "N:\my\epic\long\path\tesst\1234.txt" -leaf Returns 1234.txt Or did you need regex? Steve
free780 Posted November 9, 2017 Author Posted November 9, 2017 It's a string from the message property in Get-winevent.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now