Advertisement
pedrosgali

PedrOS fileDelete

Nov 21st, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. os.loadAPI("OS/API/file")
  2. os.loadAPI("OS/API/draw")
  3.  
  4. shell.run("cd ..")
  5. shell.run("cd ..")
  6.  
  7. draw.inputBox("Select File:")
  8. input = read()
  9.  
  10. if input == nil then
  11. else
  12.     tgtFile = tostring(input)
  13.     click = draw.optionBox("Confirm Delete.", "Delete "..tgtFile, "OK", "Cancel")
  14.     if click == "button1" then
  15.         shell.run("delete "..tgtFile)
  16.     elseif click == "button2" then
  17.     end
  18. end
  19. file.updateMenu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement