Code Sample |
#!/bin/lua alist = {} lcmd = io.popen ("ls -1a", "r") if (lcmd) then line=lcmd:read() while (line) do if (line ~= "." and line ~= ".." and line ~= "trash") then table.insert (alist,line) end line=lcmd:read() end lcmd:close () item = alist[1] else item = nil end i=1 while item ~= nil do os.execute ("rm -rf "..item) i=i+1 item = alist[i] end |
Quote (humpty @ Jan. 02 2008,17:20) |
originally the script would move the files, but i was quite surprised to find that dfm allows you to drop files onto a shortcut! |
Quote |
note: maybe a trash that just deletes a dragged file would be safer |