if ADir(temp,JustPath('C:\X\Y\A.*'),"D")=0 messagebox('Master directory does not exist') else if ADir(temp,JustPath('A:\X\Y\A.*'),"D")=0 md (JustPath('A:\X\Y\A.*')) COPY FILE 'C:\X\Y\A.*' TO 'A:\X\Y\A.*' endif endifor more generic:
lcMasterfile='C:\X\Y\A.*' lcTargetfile='A:\X\Y\A.*' if ADir(temp,JustPath(lcMasterfile),"D")=0 messagebox('Master directory does not exist') else if ADir(temp,JustPath(lcTargetfile'),"D")=0 md (JustPath(lcTargetfile)) COPY FILE (lcMasterfile) TO (lcTargetfile) endif endif