WARNING WHEN USING THIS FILE IT CAN DELETE FILES ON THE SAME FOLDER
hi this is a python 3 script for deleting files i wonder how to prevent it from deleting itself
the code:
import os
import sys
import glob
fileList = glob.glob('*.*')
print(fileList)
for filePath in fileList:
try:
os.remove(filePath)
except:
print("Error while deleting file : ", filePath)