Hi Craig,
Thank you for the reply
The copy file TO works that create a back up file into a folder as compared to the other one that copies files from a back up folder
lcCurrentDir = ALLTRIM(SYS(5))+ALLTRIM(SYS(2003))
lcDirPath = ALLTRIM(.txtDirPath.Value)
oShell = CREATEOBJECT("Shell.Application")
oDstFolder = oShell.NameSpace("&lcDirPath")
IF VARTYPE(oDstFolder)="O"
oDstFolder.CopyHere("&lcCurrentDir"+"\datafile\*.*")
ENDIF
lcCurrentDir = ALLTRIM(SYS(5))+ALLTRIM(SYS(2003))
lcDirPath = ALLTRIM(.txtDirPath.Value)
oShell = CREATEOBJECT("Shell.Application")
oDstFolder = oShell.NameSpace("&lcCurrentDir"+"\datafile")
IF VARTYPE(oDstFolder)="O"
oDstFolder.CopyHere("&lcDirPath"+"\*.*")
ENDIF
Sonny