I have been trying to delete some symbolic links in my working directory, but I am facing some issues.
os.remove
also removes the actual contents of the original folder of the link
os.shutil
throws up an error in case of symbolic links.
Is there a way to remove a symbolic link using python commands without destroying the original content?
Thanks
os.remove()
does not remove the original file for me, only the symlink (tried with Python 2.7.2 and 3.1.4). – Frédéric Hamidi Jul 28 '12 at 11:28os.shutil
? – cowlinator Aug 11 '17 at 1:42