2018-05-31 11:00:44 -07:00

22 lines
407 B
Lua

local path = ...
local old = path[1]
local new = path[2]
if old and new then
if fs.exists(old) then
if not fs.exists(new) then
if fs.copy(old, new) then
print("Copied "..old.." to "..new)
else
print(old.." is a directory")
end
else
print(new.." already exists")
end
else
print(old.." does not exist")
end
else
print("Must specify original and new path (see help cp)")
end