import os os.path.dirname('c:\\abc\\123.zip')