@Tamil Arasu10 can you suggest your solution?
Hi @Vaandu,
CMD script in Automation Anywhere:
1. Prepare your CMD script:
- Open a text editor and create a new file (.bat extension).
- Use the
pscp
command from the WinSCP package to perform the transfer. - The syntax is: pscp -pw <password> -i <private_key_path> <local_source_path> <username>@<sftp_server_address>:<destination_path>
Replace the placeholders with your information:
<password>
: Leave blank if using a private key (PPK). <private_key_path>
: Full path to your PPK file. <local_source_path>
: Full path to the folder you want to transfer. <username>
: Username for SFTP access. <sftp_server_address>
: Address of the SFTP server. <destination_path>
: Destination path on the SFTP server (you can use variables here)
2. Use the "Run Command" action in Automation Anywhere:
- Create a new Bot in Automation Anywhere.
- Add the "Open Program/file" action from the "Application" package.
- In the "Command to run" field, specify the full path to your CMD script.
- Use the "Dynamic Input" end with* and create a new variable for the daily changing destination path.
- Map the variable to the corresponding placeholder in the CMD script using curly braces (e.g.,
<destination_path>{VariableName}
).
Test the script and Automation Anywhere bot thoroughly before deployment
thanks @Tamil Arasu10 for the great support