How do I list the directory tree to use in a copy procedure.
I need it to list both files and folders and what is in folders to use when copy files and folders.
You can do this with ADIR(). Pass "D" as the third argument, and you'll get an array filled with the file and sub-directory names. Loop through this array, printing the names with "?". For the directories, call ADIR() recursively.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
You could use SCRIPTING host object to copy whole directory tree at once.
Other way is to create a recursing function based on ADIR() (as Mike suggested) to get whole tree. Keep in mind that is you use version smaller than VFP9 you could have problems if you have more than 13K files in the folder.
Borislav Borissov
VFP9 SP1, SQL Server 2000/2005.
Microsoft MVP VFP
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.