How to automate a FTP Application

Hi ,

I am working in the FTP application where we can access with files and folders.
so here my use case is i need to open a folder and iterate all the file types say (.zip,Tab file) likewise.if it is desktop i will use files.directory(selectFolder) to iterate files inside to it . here how can i iterate the files in the folders.


Above is the reference
i need to perform double click operation on file types of PNG file only.

help me how to solve this.

Regards,
Sriram

Hello @Sriram07,
This post here may be relevant.

@karavinds very nice explanation !
But my use case is bit different.
I need to get all the files from filezilla understood? if one folder contains some 100 files means that i need to access that 100 files one by one and i have to check the files one by one with my requirement.
Summary: How can i get all the files from a folder one by one in filezilla?

Hi @Sriram07,
You just have to change the selectors my code. My code example uploads the files in a loop and checks if the is uploaded successfully.

Swap the two selectors and you should be able to achieve what you need.

@karavinds your code is for looping the files in a local desktop right ? not in the folder in a ftp application .i need to get all files from ftp application


see i need all the files from the remote site say (from Softpedia.logo.png…etc) and also how can i count the number of files in that folder

I understand what you need. All that you have to do is update the selectors in the loop.

@karavinds
yeah ok even i update selectors by the way you said, tell me a thing if i am giving id as dynamic from 1 to last file. i to terminate the loop i need to count how many files are there in a folder right? how can i do it?

Don’t use Filezilla (or any other FTP program for that matter). Use the FTP Activities package. They all work perfectly in the background, and you can either use Enumerate Objects to get every file under a folder, or straight up download the entire folder and its contents.

hello @Sriram07

have you try to use FTP session activities
below activity help you to connect to FTP server

if you want to retrieve file from the ftp folder you can use below activity , which will return a collection of files in the folder

regards
ajay

yeah thanks for the response @Ajju and @JCaravaca both a lot.
please will you guys walk through me in this case.
see for example , i have a host= “domain.com”, username=john, password=abcdefgh and
port =21 credentials for filezilla right now and if i click quickconnect it will open the folders. !


like here!.
upto now i am using type into activity for typing all those credentials and click activity for quick connect , so help me how can i acheive this with the ftp activity that “Open FTP session or with FTP session” .
After that walkthrough me how can i enumerate files inside.

Hi @Sriram07

Please checkout the project I attached in this post:

It’s a working solution, you can use it as an example.

Thanks for the response!!! i understood the code !!!.
Actually there is no activity like enumerate objects there is only enumerate files.
And also tell me a thing that to open filezilla application and connecting into remote can be done by the activity open ftp session or with ftp session with the credential like hostname,username and password , port. because i’m automating with the activities type into and click on quick connect button. if i use open ftp session or with ftp session everything will be process on background right ? and for every activity it was asking configure connection if i use in with ftp session also do i have to give every time credential and make the connection? check once with the latest package of ftp activities.

Sorry for so much question am not clear in these activities and use cases.

Hi Sriram,

Could you please help me with the same if any success, mine is exactly same as yours,

Regards,
Mayank Mehta.

Hi Sriram,

Could you please help me with FTP connections.

Regards,
Mayank Mehta.