Automated FTPAutomation Anywhere
  Home > Product > Solutions > Web Automation > T14  

T14 - Automated FTP/SFTP Upload

Task Description

Upload files from a folder on FTP/SFTP server if file name contain today's date in it.

Test File T14a.atmn (Solution A) Test File T14b.atmn (Solution B)

Note: Save the .atmn file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks.

Solutions
You can upload files from a folder using the FTP feature provided by Automation Anywhere. See Solution - A.

If you want to do the same with SFTP see Solution - B.

Solution A







Variable Manager
Screenshot 1


Test Editor
Screenshot 2









Variable Manager
Screenshot 3


Test Editor
1 Create a new task
  • Click on New -> Task Editor
2 Loop through all the files in a folder

Insert a Loop command and select option 'Each file in a folder' and select folder name from where you want to upload the files.
3 Check if the filename has today's date in it.

  • Under Conditions / Loops category, double-click on If command
  • Select the option Variable
  • Click on Edit button
  • From the first drop down box select the System variable name FilenName
  • Select the Operator 'Includes'
  • In the Fix option specify the value $Day$-$Month$-$Year$
4 Upload the files on FTP server

  • From the Internet Category double-click on FTP/SFTP command.
  • Insert a FTP/SFTP connect command to connect to your FTP server.
  • Similarly insert a FTP/SFTP 'Put File' command to upload the qualifying files on FTP server.
  • To get the path of the entire file use the variables $CurrentDirectory$\$FileName$.$Extension$
  • Insert a FTP Disconnect command.
 
Solution B
1 Create a new task
  • Click on New -> Task Editor
2 Loop through all the files in a folder
  • Insert a Loop command and select option 'Each file in a folder'
  • Select the folder name from where you want to upload the files.
3 Check if the extension of file is ‘txt’.
  • Under Conditions / Loops category, double-click on If command.
  • Select the option Variable
  • Click on Edit button
  • From the first drop down box select the System variable name Extension
  • Select the Operator 'Equals To'
  • In the Fix option specify the value txt.
4 Upload the files on SFTP server
  • From the Internet Category double-click on FTP/SFTP command.
  • Insert a FTP/SFTP connect command to connect to your SFTP server. Select the Secure FTP option.
  • Similarly insert a FTP/SFTP 'Put File' command to upload the qualifying files on SFTP server.
  • To get the path of the entire file use the variables C:\$FileName$.$Extension$
  • Insert a FTP/SFTP Disconnect command.
 
Solution A: When you run this task, it will loop through all the files of the folder specified by you. For each file it will check if the filename contains today's date and if it does then will upload the file on the FTP server specified.

Solution B: When you run this task, it will loop through all the files of the folder specified by you. For each file it will check if the file is text file i,e, filename having .txt extension, and if it does then will upload the file on the SFTP server specified.
Buy Now Free Trial

Next Steps
Compare versions Compare versions
Watch a flash demo Watch a flash demo
Contact me Contact me
Ask the Expert Ask the Expert
Request live demo Request live demo

Call 1-888-484-3535

Our Customers
Automation Anywhere Customers
Customer list | Case Studies

We started using this product to copy data from legacy system to new system. Now we use it just to do about anything automated. Countless hours saved. Thank you guys.
- Jack Greenberg

Read Customer Testimonies >>
  Products     Download     Purchase     Services     Support     Customers     Company     Sitemap     Trademark FacebookTwitterAutomation Anywhere Blog © Automation Anywhere, Inc. 2012 Privacy Policy
Automation Anywhere Call: 1-888-484-3535 x1   

Automation Software - Free Trial Automation Software - Buy Now