I have a file path of, for example /Users/Documents/New York/SoHo/abc.doc
. Now I need to just retrieve /SoHo/abc.doc
from this path.
I have gone through the following:
stringByDeletingPathExtension
-> used to delete the extension from the path.stringByDeletingLastPathComponent
-> to delete the last part in the part.
However I didn't find any method to delete the first part and keep the last two parts of a path.