TEAM ENVI^ ENVIMODE=1| ENVI^ FORCELOCAL=1
COPYTIME %*

// COPYTIME SRC DST [-now]
_SUB COPYTIME,W485H249,拷贝测速,,,,, -discloseb
    SET &SRC=%1
    SET &DST=%2
    LABE -vcenter LABE1,L25T16W60H30,源文件,,
    EDIT -3D -vcenter EDIT1,L90T16W360H30,%SRC%,,0x100
    LABE -vcenter LABE2,L25T57W60H30,目文件,,
    EDIT -3D -vcenter EDIT2,L90T56W360H30,%DST%,,0x100
    EDIT -3D -vcenter EDIT3,L26T101W424H30,,,8
    LIST LIST1,L371T160W80H100,CMD拷贝|FILE拷贝,,CMD拷贝
    ITEM ITEM2,L165T160W60H30,拷贝, OnCOPY,
    ITEM ITEM1,L254T160W60H30,退出, KILL \,
    FIND $%3=-now, OnCOPY
_END

_SUB OnCOPY
    FIND $[ %EDIT1%_=_ | %EDIT2%_=_ ], EXIT
    ENVI @ITEM2.Enable=0
    ENVI @ITEM1.Enable=0
    ENVI @EDIT3=拷贝中...
    DATE T1 uptime  //ms
    FIND $%LIST1%=CMD拷贝,  EXEC =*cmd /c copy /b %EDIT1% %EDIT2%    //还是CMD的COPY
    FIND $%LIST1%=CMD拷贝,! EXEC =*%MyNAME% FILE %EDIT1%=>%EDIT2% 
    DATE T2 uptime  //ms
    CALC TU=(%T2%-%T1% ) /1000   //s
    SIZE SZ=%EDIT1%
    CALC SD=%SZ% / %TU%  / 1M #3
    CALC SZM=%SZ% / 1M#3
    CALC TU=%TU%#3
    ENVI @EDIT3=%T1%ms-->%T2%ms %TU%秒  %SZM%M    %SD%M/秒
    
    ENVI @ITEM1.Enable=1
    ENVI @ITEM2.Enable=1
_END

