Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create folder and copy data into it
Message
De
27/09/2004 11:02:02
 
 
À
27/09/2004 09:24:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00946159
Message ID:
00946270
Vues:
26
cFolder1 = "C:\profiler32\data\"
cFolder2 = "c:\temp1"
cfiles = cFolder1+"*.dbf"

DECLARE INTEGER CreateDirectory IN kernel32;
		STRING lpPathName, INTEGER lpSecurityAttr

IF !DIRECTORY(cfolder2)
	IF CreateDirectory (cFolder2, 0) = 0
		=MESSAGEBOX('Could not create '+cfolder2)
		RETURN
	ENDIF
	IF !DIRECTORY(cfolder2)
		=MESSAGEBOX('Could not create '+cfolder2)
		RETURN
	ENDIF
ENDIF

=ADIR(allfiles,cfiles)

DECLARE INTEGER CopyFile IN kernel32;
		STRING  lpExistingFileName,;
		STRING  lpNewFileName,;
		INTEGER bFailIfExists


FOR i = 1 TO ALEN(allfiles,1)
	=CopyFile(cfolder1+allfiles(i,1), cfolder2+"\"+allfiles(i,1), 0)
ENDFOR
return
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform