datadir="d:\c2007\tables\" &&Source backdir="d:\c2007\tables\Backup\" && Target =adir(afiles,datadir+"*.dbf") declare integer CopyFile in KERNEL32.dll ; string @SourceFileName, ; string @DestFileName, ; integer bFailIfExists nsucces=0 for nt = 1 to alen(afiles,1) nsucces=copyfile("datadir"+afiles[nT,1],"backdir"+afiles[nT,1],0) wait window "Done" if nsucces = 0 wait window "Error" exit && endif endfor