Advertisement
pedrosgali

PedrOS fileCopy

Nov 21st, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 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 to copy:")
  8. input = read()
  9. target = tostring(input)
  10.  
  11. draw.inputBox("Select destination:")
  12. input = read()
  13. dest = tostring(input)
  14.  
  15. click = draw.optionBox("Select copy type:", "Backup file of transfer and Delete?", "Backup", "transfer")
  16.  
  17. if click == "button1" then
  18.     shell.run("copy "..target.." "..dest)
  19. elseif click == "button2" then
  20.     shell.run("copy "..target.." "..dest)
  21.     shell.run("cd ..")
  22.     shell.run("cd ..")
  23.     shell.run("delete "..target)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement