Archived Forum Post

Index of archived forum posts

Question:

Need listing of what PutTree would upload.

Sep 05 '12 at 11:29

I need a listing of what PutTree uploads to the remote site. Will ftp.DirTreeXml tell me or is there something else?


Answer

PutTree uploads an entire directory tree to the FTP server. To know what would be uploaded, you would need to find a way to get a list of all the files and directories in a local directory tree. Given that this task really has nothing to do with Chilkat, there are surely ways to do in whatever programming language or environment you are using.

There are a few "Chilkat" ways of doing it:

1) Call the Ftp2.CreatePlan method to get a "plan" string that details what would be done to upload an entire local tree (via the PutPlan method). You would need to have a look at the "plan" string and write code to parse it.

2) Use the ChilkatDirTree ActiveX object (http://www.chilkatsoft.com/refdoc/xChilkatDirTreeRef.html) or the Chilkat.DirTree .Net class (http://www.chilkatsoft.com/refdoc/vbnetDirTreeRef.html) to iterate over the files in a local directory tree.

You wouldn't use the ftp2.DirTreeXml property because that's getting a remote directory tree.