Powershell command to trim path if ends "\" -
i need trim path if ends "\".
c:\ravi\
i need change
c:\ravi
i have case path not end "\" (then must skip).
i tried .endswith("\")
. fails when have "\\" instead of "\".
is powershell way instead of having conditions.
no need overcomplicate
"c:\ravi\".trim('\')
Comments
Post a Comment