FTP PUT: Upload a folder with WinSCP - Alternative Method
This is a template to transfer a folder and all the files and folders containes to a remote server using FTP/SFTP/SCP.
Description
This is a template to transfer a folder and all the files
                                                                           and folders containes to a remote server using FTP/SFTP/SCP.
This Uproc uses WinSCP to perform the transfer.
This is similar to another app but this is a different approach to invoking WinSCP from within Dollar Universe. This moves
                                                                           an entire directory structure including all sub-directories from the specified location and down.
This alternate
                                                                           version can be useful for some firewall configuration that can prevent the other method.
This was tested with $U
                                                                           v6.1, but the approach should work with older versions of $U as well and a variation could be defined for UniJob. For those
                                                                           environments, you might use the sample cl_int script as an external file (also attached).
Implementation
1) Download and install WinSCP (I am using v5.5).
2) Test WinSCP from the WinSCP GUI, using a known ftp/sftp
                                                                           location. This includes defining the appropriate ‘sessions' and saving the password as part of that session.
3)
                                                                           In the WinSCP GUI, select Tools/Preferences/storage and select the option to use the windows registry for holding the connection
                                                                           information. Use of the .ini file APPEARS to be deprecating - from comments in the WinSCP site.
4) Verify what
                                                                           OS user is actually running the winscp. You will need that in a couple of steps.
5) Import the attached package.
6) Identify an MU that can submit jobs with the OS user identified in (4).
7) Update the variables in the
                                                                           uproc: 
a. Set local and remote directory desired
b. Set FTP command (I have only tested with GET and
                                                                           PUT)
c. Set the winscp_path to the location where winscp is installed (1).
d. Set a default winscp Session.
                                                                           This identifies the server, user and password for the remote server. Note: the session can be a single word or be a folder
                                                                           and session eg orsyp/orsyp_ftp_site.
8) Save and run the uproc. Note: if running directly from a uproc, you must
                                                                           select the correct MU at time of submission, as in (6).
Some “”…”” are added around the local and remote directory
                                                                           in the uproc script to handle the cases where there are spaces in those names.
| Products | Workload Automation, Dollar Universe Workload Automation | 
| Operating Systems | Windows | 
| Last update | 2015-05-11 22:07:38.0 | 
| Supported by | |
| Community Source | ftp-put-upload-a-folder-with-winscp-alternative-method | 
| Broadcom does not support, maintain or warrant Solutions, Templates, Actions and any other content published on the Community
                                                                              and is subject to Broadcom Community Terms and Conditions.
                                                                            | |