Index
2007-03-01 15:19Tracy Pearson : RE: How to Copy (not move) Directory, Subdirectories and files withFoxPro
Back to top
RE: How to Copy (not move) Directory, Subdirectories and files withFoxPro

Author: Tracy Pearson

Posted: 2007-03-01 15:19:07   Link

Declare integer MoveFile in WIN32API string@, string@

Clear

cFrom = "C:\TEMP\MyTestFolder\Test"

cTo = "C:\TEMP\MyTestingFolder\Test"

If not Directory(cFrom)

Md (cFrom + "\Level2")

EndIf

If Directory(cTo)

Rd (cTo)

EndIf

If not Directory(JustPath(cTo))

Md JustPath(cTo)

EndIf

* 1=Success, 0=Failed

?MoveFile(@cFrom, @cTo)

©2007 Tracy Pearson