Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Show folder
Message
From
19/05/2005 05:32:56
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01015716
Message ID:
01015744
Views:
37
hi,
thanks for reply,
but i need to copy tables i can choise from my dir
as getdir(), and after that getfile() to new place as folder or drive A...etc

and i need to SEE the copy operation as if copy any file or dir at the desktop, d:\,c:\ and a:\ to another place . you can see two folders .
from folder1....to folder2.THIS IS THE IMPORTANT PART
..
when i run the code as it is

i get error message autamiticly(the folder desktop connot be used please choose another folder
another message (the folder mydocument connot be used please choose another folder.
thank you



>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform