NAME
FtpUploadDirectory — Upload local directory to remote directory.
SYNOPSIS
FtpUploadDirectory FtpHandle Directory OverwritePolicy RecursePolicy DeleteUnmatchedPolicy
DESCRIPTION
Return Value
None.
Arguments
FtpHandleHandle for FTP connection.
LocalDirectoryLocal directory to upload from.
OverwritePolicyIf there are local copies with the same name, then when to overwrite them.
Options are: OverwriteAll, LocalNewer, SizeDifferent, LocalNewerOrDifferent, LocalNewerAndDifferent.
RecursePolicyRecurseIntoSubdirectories or DoNotRecurse
DeleteUnmatchedPolicyDeleteUnmatched or LeaveUnmatched
More Info
See About FTP Use for additional details.

Local and remote directory have to have the same name. The command will cd into the directory on both ends to start with. Prior to making this call, you can cd and ftp::Cd yourself through the part of the path that is different, and then make the call (see example).

Note that if you want to do mirroring or you want to do the equivalent of a copy-and-paste, there are the FtpMirrorLocalToRemote and FtpDownloadSite commands.

Currently, there is no way to do the following: both (a) delete all unmatched files and also at the same time (b) leave unmatched directories.

If you set the NoRecurse option and the same directory is on both sides, then that directory will still be considered matched, and so it will not be deleted.


For information regarding exceptions / errors, see here.
EXAMPLES
% set FtpHandle [ftp::Open $IpAddress $Username $Password]
% cd c:/my/local/folder
% ftp::Cd /home/my/directory
% FtpUploadDirectory $FtpHandle start OverwriteAll RecurseIntoSubdirectories LeaveUnmatched
SEE ALSO
FtpDownloadDirectory, FtpMirrorLocalToRemote, FtpUploadSite
KEYWORDS
file, network