AnsweredAssumed Answered

How to get the first directory from a file location

Question asked by Aj Bosma on Jun 20, 2016
Latest reply on Jun 22, 2016 by Viktor Bovzdarenko

How do i get the first directory from a file path, where de directory is e.g.:   x:\16.001\Section\110

 

By using:

 

MyFolder = CurDir$

MyPath1 = Left(swModel.GetPathName, InStrRev(swModel.GetPathName, "\") - 1)
MyPath1 = Right(MyPath1, Len(MyPath1) - InStrRev(MyPath1, "\"))

 

i can get 110.

But i can't get to 16.001

 

Any help would be welcome

Outcomes