>Hello everyone:
> How to backup a folder which include sub directory,and the number of the sub directory didn't know?
You can either recurse the directory structure yourself, travelling to each subdirectory, backing up its files, checking to see if it has any subfolders, and if so, recursing into those subfolders, or you can use a function that has built-in recursion, such as the Scripting.FileSystemObject's CopyFolder (it copies a folder as a whole, including any subfolders) or SHFileOperation(), an API call that can perform copies with recursion. The Scripting.FileSystemObject is a part of the Windows Scripting Host, and its use in VFP is discussed in a 5 part article that George Tasker and I wrote for VFUG a while ago (
www.vfug.org - there's also a link to it in the Articles area of UT), and SHFileOperation is documented in the Windows API section here on UT.
Use of a copy operation is not an adequate means of backup IMO, at least in the majority of circumstances where there is a need for ongoing, iterative backup on a regular, scheduled basis - there's a considerable amount of additional work involved in performing a backup, for which I'd recommend relying on a commercial backup product like Seagate Backup or CA ArcServe to provide all the necessary functionality.