Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create folder and copy data into it
Message
From
27/09/2004 11:02:02
 
 
To
27/09/2004 09:24:10
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00946159
Message ID:
00946270
Views:
28
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"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform