Paragon-neo/100G: Automation - Transferring files to the local PC

Paragon-neo/100G: Automation - Transferring files to the local PC

Python wrapper: Yes TCL wrapper: No

Functions to transfer files and folders from the instrument to the local PC.

calnexDownloadFile(folder_type: str, src_folder: str, filename: str, dest_folder: str)

calnexDownloadFolder(folder_type: str, src_folder: str, dest_folder: str = "./", new_folder_name: str = None

Notes:

calnexDownloadFile()

Download a file from the instrument Arguments: folder_type: str e.g. "ExportFolder", "SessionsFolder", "ReportFolder" This is a specific root folder on the instrument, it may have sub-folders that are addressed using the src_folder argument below. src_folder: str The name of the folder on the instrument, use './' for the root of the specified folder. For sessions files this is the name of the session folder e.g. Session_<date> filename: str The name of the file - for capture files, this is the name of the file in the Session folder dest_folder: str The name of the folder on the local machine where the remote file will be saved Results: Raises an error if the file cannot be found on the instrument. Raises an error if the destination folder doesn't exist. If the local file or folder can't be accessed then Python will raise a file access error.

Example:

calnexDownloadFile('ExportFolder', "./', 'My_Export.csv', 'c:/home/temp')

Download the file “My_Export.csv” from the root (./) of the on-instrument CAT Export folder (“ExportFolder”) to the (already existing) local destination folder “c:/home/temp”

 

calnexDownloadFolder()

Downloads a folder from the instrument. Creates the local folder with the same name as on the instrument, unless a new folder name is specified. Arguments: folder_type str e.g. "ExportFolder", "SessionsFolder", "ReportFolder" This is a specific root folder on the instrument, it may have sub-folders that are addressed using the src_folder argument below. src_folder: str The name of the folder on the instrument, use './' for the root of the specified folder. For sessions files this is the name of the session folder e.g. Session_<date> dest_folder str (optional) The name of the folder on the local machine where the remote file will be saved. If none is specified defaults to the current folder. new_folder_name str (optional) The new name for the copied folder. Results: Raises an error if the folder cannot be found on the instrument If the local folder can't be accessed then Python will raise an error.

Example:

calnexDownloadFolder('SessionsFolder', 'Session-2022-11-29T13.02.10.615', 'c:/home/temp', 'My_New_Folder')

Download the folder “'Session-2022-11-29T13.02.10.615” from the Sessions folder on the instrument to the already existing folder “c:/home/temp” on the local PC, the folder name of the transferred folder on the local PC is “My_New_Folder”.