write a function that compares the two strings from the start to the end. When they don't match anymore build the correct relative path and return it. Use the string methods to look for / and \, somthing like this
Local index:Int = filename.FindLast("/")
Local path:String = ""
If index=-1 Then index = filename.FindLast("\")
If index<>-1 Then path=filename[..index]
Local index:Int = filename.FindLast("/")
Local path:String = ""
If index=-1 Then index = filename.FindLast("\")
If index<>-1 Then path=filename[..index]