printing the name of the files goes fine but when I try to use os.remove it says it cannot find the file. I also tried full path but also didnt work.
here is my code
import os
for tempfiles in os.listdir(r"All Posts"):
os.remove(tempfiles)
printing the name of the files goes fine but when I try to use os.remove it says it cannot find the file. I also tried full path but also didnt work.
here is my code
import os
for tempfiles in os.listdir(r"All Posts"):
os.remove(tempfiles)