There was a problem with the identification of files in this directory with the win 10 OS after the last update (before that, the script worked on the wines 10), and on other versions of windows everything works. Code:
import dbg import app import os def RunCheckUp(): Whitelist = ['test.dll','C.exe','folder','blabla.exe','xd.exe','plugins'] path = os.getcwd() arr = [] t = os.walk(path) for k in next (t): arr.append("/" + path + "/" + str(k)) if k != Whitelist: ####Starting_Phase01##### for item in k: if not item in Whitelist: dbg.LogBox(" Удаление не нужного файла: " + str(item)) try: os.remove(item) except: dbg.LogBox(" Прога сейчас закроется! ") dbg.LogBox(" Удалите лишний файл: " + str(item)) app.Abort() else: pass RunCheckUp() ps Tried to change the path by adding / but there is no result arr.append ("/" + path + "/" + str (k))
p.s2 also tried the directory verification code like this:
path = os.getcwd() k = os.listdir(path) In this case, the error is again only on win10, while on others the windows version all works. Win10 Error: 
