How can i check the existance of new file in a ftp server every given period

I have to download a file from an FTP server every day but sometimes there is no new file so I should make an exception to check the existence of a new file if it is not found I have to restart the process until it exists
please can anyone help?

Hello @Imene_ZARAI
You can use the File exist activity to check the file available in a specific location.
Use Flow decision and pass the variable from the File exist activity.
If the file not exists, it results in a false and connects the loop to File Exist.
If the file exists, it results true and the process will continue.

1 Like

thank you but how can I check if there is a new file or not because every day i have to download just the new file ?

Pass the file name with path which is needed to check in the File Exist activity.

the name changes every day I guess there is a script in which I will put a condition that tracks the date of the file and if it’s the same date as today then I will download it
but i don’t know the script to do it :worried: :face_with_diagonal_mouth:

do you have any idea about how many files will download in a day?

1 Like

just one file

Does the file name in Date format like File20221101.xlsx?

1 Like

Hi @Imene_ZARAI ,

What about below workflow

Sequence.xaml (9.9 KB)




this is the name format of every file

try this in File Exist


Note:Change .txt with your file extension
Your path should placed in before the filename


1 Like

thank you very much you saved me :pray: :pray:

Thanks a lot :smile:

1 Like

I am getting error can you help me for that and please help me to understand below expression.


Hi @Aleem_Khan ,

make sure for each Type Argument


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.