I need to write a cmd script that gets a path variable from registry and returns that path up some levels. So far I've managed to read the string from the registry and now I only need to turn this:
C:\dir\wasd\qwert\someotherdir
into this:
C:\dir\wasd\qwert\
and I'm stuck. Help is very apreciated. Thanks!