i'm having a hard time getting this right. I am using folder.find to delete folders NOT found in another table but i am getting nowhere. The goal is is to delete ALL folders under "c:\temp" EXCEPT "c:\temp\test1", "c:\temp\test2" and "c:\temp\test3"
Code:
tNowList = Folder.Find("c:\\temp", "*", false);
tThenList = {"c:\\temp\\test1","c:\\temp\\test2","c:\\temp\\test3"};
for j, k in pairs (tNowList) do
if not (k == tThenList[j]) then
Folder.DeleteTree(tNowList[j]);
end
end