FUNCTION MoveFilePreserveCase
LPARAMETERS lcOrigPathAndFileName, lcNewPath
LOCAL laArr[1], llDeclared, lnFiles, lcTrueName, llOK
llDeclared = ADLLS(laArr) > 0 AND ASCAN(laArr, 'MoveFile', 1, -1, 1, 6) > 0
IF !llDeclared
DECLARE integer MoveFile IN kernel32.dll string ExistingFile, string NewFile
ENDIF
lnFiles = ADIR(laArr, lcOrigPathAndFileName, "", 1)
IF lnFiles = 1
llOK = MoveFile(ADDBS(JUSTPATH(lcOrigPathAndFileName)) + laArr[1,1] , ;
ADDBS(lcNewPath) + laArr[1,1]) <> 0
ENDIF
RETURN llOK
FUNCTION CopyFilePreserveCase
LPARAMETERS lcOrigPathAndFileName, lcNewPath
LOCAL laArr[1], llDeclared, lnFiles, lcTrueName, llOK
llDeclared = ADLLS(laArr) > 0 AND ASCAN(laArr, 'CopyFile', 1, -1, 1, 6) > 0
IF !llDeclared
DECLARE integer CopyFile IN kernel32.dll string ExistingFile, string NewFile
ENDIF
lnFiles = ADIR(laArr, lcOrigPathAndFileName, "", 1)
IF lnFiles = 1
llOK = CopyFile(ADDBS(JUSTPATH(lcOrigPathAndFileName)) + laArr[1,1] , ;
ADDBS(lcNewPath) + laArr[1,1]) <> 0
ENDIF
RETURN llOK
|