decorative banner

Previous | Next               Table Of Contents > 3 File transfer commands > 3.4 Transferring files and folders

3.4 Transferring files and folders


The ftpdownload command can be used to download either an individual file or an entire folder tree. The files and folders are downloaded to the current local working path that was set using the ftpsetpath command. The predefined keywords file and folder are used to specify either a file or a folder. An optional local name string can be provided to save the downloaded item to a new name. The ftpresult predefined status flag is set to the predefined constant success if the command completed successfully.

The syntax is

ftpdownload <keywords: file, folder>, <remote name string> [, optional: <local name string>];

Some examples are

ftpdownload file, "text.dat"; #download file

ftpdownload file, "text.dat", "text_0503.dat"; #download file and save as text_0503.dat

ftpdownload folder, "www"; #download entire folder tree


 

The ftpupload command can be used to upload either an individual file or an entire folder tree. The files and folders are uploaded to the current remote working path that was set using the ftpsetpath command. The predefined keywords file and folder are used to specify either a file or a folder. An optional remote name string can be provided to save the uploaded item to a new name. The ftpresult predefined status flag is set to the predefined constant success if the command completed successfully.

The syntax is

ftpupload <keywords: file, folder>, <local name string> [, optional: <remote name string>];

Some examples are

ftpupload file, "out_text.dat"; #upload file

ftpupload file, "out_text.dat", "out_text_0503.dat"; #upload file, saving it as out_text_0503.dat

ftpupload folder, "www"; #upload entire folder tree


Previous | Next