I am using this python script:
import dbg
import app
import os
def RunCheckUp():
Whitelist = [
'Folder1',
'Folder2',
]
path = os.getcwd()
k = os.listdir(path)
if k != Whitelist:
for item in k:
if not item in Whitelist:
dbg.LogBox("The next file will be deleted: " + str(item))
try:
os.remove(item)
except:
dbg.LogBox("Delete this file " + str(item) + " pentru a putea juca.")
dbg.LogBox("The program will be closed.")
app.Abort()
else:
pass
if Whitelist != k:
for missing in Whitelist:
if not missing in k:
dbg.LogBox("The program can't start! This file is missing: " + str(missing))
app.Abort()
else:
pass
RunCheckUp()
My question is how to add a file that is in the Folder2, I want do add "file1" and "file2" because I want to protect file1 and file2 from deleting not just the folder Something like this Folder2/file1