` We're gonna see where the two slashes are slashes_counted = 0 for c = len$(DirName) to 0 step -1 ` If the character we're at is a / increase slashes_counted if mid$(DirName, c) = "/" then inc slashes_counted, 1 ` If we've passed two slashes, exit the loop if slashes_counted = 0 then exit next c ` Get the last part of the file thing. last_part_of_dir = right$(DirName, len$(DirName) - c)