How to automate predefined jobs e.g. file transfer with ad hoc selected remote Host


If you are using Netop Remote Control to remotely connect to endpoints and want to automate a predefined file transfer job, you can do this by using the Guest scripting feature. A standard Guest script provides this feature for a predefined set of endpoints.

But you can add more flexibility to the standard script and be able to create ad hoc connections to various endpoint Hosts and perform a predefined file transfer job. In this example a file transfer operation is described, but it might as well be another type of session e.g. run a program or script on the remote Host computer.

The attached package consists of three files. All to be used on the Windows Guest computer:

Here is what to do:

  1. Extract the zip file to a suitable folder of your choice on the Guest computer;
  2. Edit the adhocft.template to match your file transfer requirements.
    The predefined parameters in this template are the communication profile to use (in this case TCP/IP), the copy-from path file on the Host and copy-to path on the Guest. The login credentials for the Host connection can be defined too, but this has to be done from within the Guest in order to have the password encrypted. The adhocft.template also holds the information related to reactions to events;
  3. Run the sed setup executable to install it;
  4. Launch the getfile command script. It prompts you for Host ID - type IP address or DNS name. It then injects this into a temporary Guest script (adhocft.dws), which launches the Guest;
  5. The Guest should connect to the Host, prompt you for credentials (if not predefined) and then perform the file transfer;

 The script will prompt the user for a Host IP address and then inject that into a new dws file which is used to launch the Guest and process the file transfer.

 

Disclaimer:

The sample scripts and tools provided here are not supported under any Netop standard support program or service. All scripts are provided as is without warranty of any kind. Any risk arising by the use or performance of the sample scripts, tools and documentation remains with you. In no event shall Netop, its authors, or anyone else involved in the creation, production, or delivery of the scripts and tools be liable for any damages whatsoever.

 



Article Number: 539
Posted: Tue, Jun 8, 2021 7:38 AM
Last Updated: Thu, Jun 10, 2021 10:18 AM

Online URL: https://kb.netop.com/article/how-to-automate-predefined-jobs-e-g-file-transfer-with-ad-hoc-selected-remote-host-539.html