A real copy handler for rev

MisterX b.xavier at internet.lu
Sun May 22 01:47:11 EDT 2005


Requires Robocopy from the resource kit but can be easily changed for
xcopy or copy or scopy or the daunting xxcopy.com mega copy tool.

function CopyFile srcpath,destpath,dfiles,doptions,logpath
  if srcpath="" or destpath="" then
    -- parse error
    put 2 into thisp
    if srcpath is empty then put 1 into thisp
    return "Error: parameter"&&thisp&&"empty error"
  end if
  
  -- defaults
  if dfiles is empty or dfiles="all" then put "*.*" into dfiles
  
  put "/e /z /np /sec /r:0 /v /log+:"&logpath into doptions
  
  get shell("START ROBOCOPY" && srcpath && destpath && dfiles && doptions)
  return it
end CopyFile

Note: this script is part of the TAOO NT lib. 
It's the most primitive version dated 4 years ago ;)

cheers
Xavier
http://monsieurx.com



More information about the use-livecode mailing list