Getting the folder of a link