Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Show folder
Message
 
À
19/05/2005 02:51:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Divers
Thread ID:
01015716
Message ID:
01015722
Vues:
41
Here's one way to do it...
LOCAL lcSourceDirectory, lcDestinationDirectory, lcFileName
lcSourceDirectory = GETDIR("","Select Source Directory","Select",64)
IF !EMPTY(lcSourceDirectory)
	lcDestinationDirectory = GETDIR("","Select Destination Directory","Select",64)
	IF !EMPTY(lcDestinationDirectory)
		SET DEFAULT TO (lcSourceDirectory)
		lcFileName = SYS(2000,"*.*") && modify mask depending on what you want to copy, right now it copies all
		DO WHILE !EMPTY(lcFilename)
			COPY FILE (lcFilename) TO (lcDestinationDirectory + JUSTFNAME(lcFilename))
			lcFileName = SYS(2000,"*.*",1) && modify mask depending on what you want to copy, right now it copies all
		ENDDO
	ELSE
		MESSAGEBOX("Destination directory is required.", 64, "Copy Process Terminated")
	ENDIF
ELSE
	MESSAGEBOX("Source directory is required.", 64, "Copy Process Terminated")
ENDIF
You could add additional code to create the destination directory if it doesn't exist using the MKDIR command.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform