Add a general copy function for lua and use it with voicemail forward.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
--add the copy function
|
||||
function copy(src,dst)
|
||||
if (package.config:sub(1,1) == "/") then
|
||||
--unix
|
||||
cmd = [[cp "]] .. src .. [[" "]] .. dst .. [["]];
|
||||
elseif (package.config:sub(1,1) == [[\]]) then
|
||||
--windows
|
||||
src = src:gsub("/",[[\]]);
|
||||
dst = dst:gsub("/",[[\]]);
|
||||
cmd = [[copy "]] .. src .. [[" "]] ..dst.. [["]];
|
||||
end
|
||||
os.execute(cmd);
|
||||
return cmd;
|
||||
end
|
||||
Reference in New Issue
Block a user