Jul-24-2021, 03:02 PM
Hi,
I created a file and after done it is opened and saved by user. I then need to delete from my current directory in my project. I tried the remove method but not working!
I created a file and after done it is opened and saved by user. I then need to delete from my current directory in my project. I tried the remove method but not working!
file = str(pdf_file_name) # file name is similar to something.pdf location= "C:/abc/efg/" path = os.path.join(location, file) os.remove(path)I get this error:
Error:'something.pdf' is not recognized as an internal or external command,
operable program or batch file.