Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- if #args < 2 then
- print("Uso: cp <directory> <copia>")
- return
- end
- if not fs.exists(shell.resolve(args[1])) then
- print("Il file non esiste")
- return
- end
- if fs.exists(shell.resolve(args[2])) then
- print("Il file esiste gia'")
- return
- end
- file = fs.open(shell.resolve(args[1]), "r")
- cont = file.readAll()
- file.close()
- file = fs.open(shell.resolve(args[2]), "w")
- file.write(cont)
- file.close()
Add Comment
Please, Sign In to add comment