def parseFolderName(url):
	"""Parses the folder name from a given url"""
	pieces = url.split('/')
	pieces = [s for s in pieces if s] # remove all empty strings

	if '.' in pieces[len(pieces)-1]:
		folderName = pieces[len(pieces)-2].replace("%20", "_")
	else:
		folderName = pieces[len(pieces)-1].replace("%20", "_")

	if ':' in folderName:
		return pieces[len(pieces)-1]
	else:
		return folderName