Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fso - open directories and copy contents
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01593241
Message ID:
01593323
Views:
27
Hi Karen,

To copy a folder and all its contents (including sub-folders) you can just do this:
loFSO			= CreateObject('Scripting.FileSystemObject')
loFolder		= loFSO.GetFolder('c:\temp\myTest')
loFolder.Copy('c:\temp\myCopiedTest')
If you really need to copy them in reverse order (not sure I understand the reason) then you could loop for each folder with adir as Borislav showed.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform