Skip to main content
Version: v6.7.0

Upload folder

Command Description​

Upload the locally specified folder (including all subfolders and contents) to the remote folder of the file transfer service

Command Prototype​

uploadFolderStatus = CommanderFileService.UploadFolder(sRemotedir,sLocalpath)

Command parameter​

parametermandatorytypedefault valueInstructions
sRemotedirTruestring""Remote folders that already exist in the file transfer service
sLocalpathTruepath''' C:\Users'''Specify the path of the local uploaded folder, which cannot contain files in exe format internally, otherwise an exception prompt will be thrown during runtime

Return result​

UploadFolderStatus, Assign the result of running the command to this variable.

Run instance​

/*********************************Upload Folder***************************************
Command Prototype:
uploadFolderStatus = CommanderFileService.UploadFolder(sRemotedir,sLocalpath)
Input Parameters:
sRemotedir -- Remote folder. Note: An existing remote folder in the file transfer service.
sLocalpath -- Local folder. Note: Specify the path of the local folder to be uploaded. The folder must not contain any files in exe format, otherwise an exception will be thrown during runtime.
Output Parameter:
uploadFolderStatus -- The variable where the output of the function call will be saved.
Notes:
None
********************************************************************************/
Dim uploadFolderStatus = ""
uploadFolderStatus = CommanderFileService.UploadFolder("",'''C:\Users''')
TracePrint(uploadFolderStatus)