--[[
@title DeletePics
]]
dir = os.listdir("A/DCIM/100CANON", false)
if #dir ~= 0 then
for i=1, #dir do
os.remove("A/DCIM/100CANON" .. dir[i])
end
else
print("Directory Empty")
end
print("Memory Cleared")
I tried the above code, and it printed "Memory Cleared". The pictures however were still there, nothing happened. I printed the names of the pictures in another script, and they were "IMG_XXXX.JPG", which should work with the above script. Could someone please help me out with this?