How to delete image/video files in python 3? I know how to delete them when we know the name of image/video, however when I don't know the name of image in some file/folder how can I delete it with the help of their formats like .jpg/.mp4.
I tried to follow the steps suggested in other question wit no luck,
>>> os.remove("C:\Program Files\Python36\*.png")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [WinError 123] The filename, directory name, or volume label syntax
is incorrect: 'C:\\Program Files\\Python36\\*.png'
os.remove("C:\Program Files\Python36\INC0077896.png") #here I am able to delete image