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

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -