Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell Variable trimming

$
0
0

Geeks,

Im trying to trim the below string but unable to get what i acheive-

$string = "\\winfile01\D$\share01\2016\May\Dept"

I would like the $string to be trimmed and saved as value "Dept" stored in variable.

i already tried the various trim functions, but not able to get what i want.

Let me know how to proceed with it.


Cheers, Alan.


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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