Download file
Command Description
Download the specified single file from the file transfer service of the Commander to the local folder
Command Prototype
filePath = CommanderFileService.DownloadFile(sRemotefile,sLocalpath,bCover)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
sRemotefile | True | string | "" | The file path specified in the file transfer service |
sLocalpath | True | path | ''' C:\Users''' | Save to local folder path |
bCover | True | boolean | False | When saving locally, if a file with the same name already exists in the path, select 'Yes' to overwrite it, and select' No 'to automatically rename it |
Return result
FilePath, Assign the result of running the command to this variable.
Run instance
/*********************************Download File****************************************
Command Prototype:
filePath = CommanderFileService.DownloadFile(sRemotefile,sLocalpath,bCover)
Input Parameters:
sRemotefile -- Remote file. Note: The specified file path in the file transfer service.
sLocalpath -- Download path. Note: The local folder path where the file will be saved.
bCover -- Whether to overwrite. Note: When saving to local, if a file with the same name already exists in the path, select "Yes" to overwrite, or "No" to automatically rename.
Output Parameter:
filePath -- The variable where the output of the function call will be saved.
Notes:
None
********************************************************************************/
Dim filePath = ""
filePath = CommanderFileService.DownloadFile("",'''C:\Users''',False)
TracePrint(filePath)