LDShadowLord

Backupv1

Apr 12th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. --Written by LDShadowLord
  2. --Verson 1.0
  3. --NOTES:
  4. --This program assumes you have a disk. If you don't then it WILL throw errors! It also assumes that the program you are entering is a real program!
  5. tArgs = {...}
  6. FDest = "disk/.backup/bkup-"..tArgs[1])
  7.  
  8. if disk/.backup == false then
  9.   fs.makeDir(disk/.backup)
  10. else
  11.   if tArgs[1] == "askforhelp" then
  12.     print("Use the command backup <Programname> to backup a file. by default it will backup into a disk folder")
  13.   else
  14.     fs.copy(tArgs[1], FDest)
  15.     print(tArgs[1].." Has been backed up to "..FDest)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment