Jump to content

substract string

Recommended Posts

I ve got a problem. I ve got an absoult path but i want a relative.



$string = "C:\doc\emu\word\path\path\2"

 I know the working folder of my script

$workingFolder = @ScriptDir  // C:\doc\emu\word

So what i want is

$result = "path\path\2"

So the easiest way would be to substract workingFolder of $string and the result is the remaing part. But i cant figure out how to do that.


any ideas?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...