Python Forum
[Tkinter] remove file from current project
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] remove file from current project
#1
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!

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.
Reply


Messages In This Thread
remove file from current project - by rwahdan - Jul-24-2021, 03:02 PM
RE: remove file from current project - by menator01 - Jul-25-2021, 06:14 AM
RE: remove file from current project - by Larz60+ - Jul-25-2021, 09:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Unable to get current contents of the entry field where the content is the file path pmpinaki 1 2,246 Apr-18-2020, 06:45 PM
Last Post: deanhystad
  python file(.py) not working with my tkinter project DeanAseraf1 9 7,211 Mar-22-2020, 10:58 PM
Last Post: ifigazsi
  Problem In calling a Function from another python file of project vinod2810 7 5,380 Oct-05-2019, 01:09 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020