Powershell Variable trimming
geeks,
im trying trim below string unable acheive-
$string = "\\winfile01\d$\share01\2016\may\dept"
i $string trimmed , saved value "dept" stored in variable.
i tried various trim functions, not able want.
let me know how proceed it.
cheers, alan.
hi alan,
try this:
$leaf = split-path $string -leaf $leaf
cheers,
fred
there's no place 127.0.0.1
Windows Server > Windows PowerShell
Comments
Post a Comment