Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Seeking Alternative to COPY FILE Command
Message
 
 
À
12/01/2007 07:43:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00444304
Message ID:
01184982
Vues:
26
Windows API functions are case sensitive, so it should be CopyFile.

>Dear Sir,
>
>When I run Following codes, it do nothing
>What is wrong?
>
>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
>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform