Moving the pdf and xls file to destination path

Hello community!

In above image there are file name’s which i want to move from download folder to destination path the pdf’s file name get changes daily & xls file name will be like Annexure.xls sometime it will be ANNEXURE.xls sometime Annexure_202029.xls like this

I tried using directory.getfiles and using this variable in for each and using a path exist activity and after that i used if condition also but it didnt work

What is the another simple logic to do?

Hi @Priyesh_Shetty ,
You can use for each file in folder

select create newest first to get newest downloaded file, check name…etc
hope it help,

@Nguyen_Van_Luong1 there are 2 different files i want that it should move all the xls and pdf files to destination folder.

You can use 2 for each file,
1 for pdf file like my pre comment
1 for xlsx file , it’s similar
change filter by “.xlsx”

@Nguyen_Van_Luong1 what about the if activity should i use 2 if activity for 2 different files?

@Priyesh_Shetty Try with


You all files will be stored in array of string

It will work.


@devasyasingh i want to move all the files pdf also and xls also.

@Priyesh_Shetty Take two directory.get files. One for PDF and one For Excel.



Like shown in above image there 20230918.pdf,Annexure.xls i want to move all this files to destination.

Base on file name you want to get, if have many condition,
eg ; filename.contain(a) or filename.contain(b)

@Nguyen_Van_Luong1 it doesnt worked.

Can you share you file, I will test for you

@Nguyen_Van_Luong1 i cant share as per the company policy.

Oh, I will create sample to check then send to you later

@Nguyen_Van_Luong1 ya please

Hi @Priyesh_Shetty ,
my output

get file.xaml (15.2 KB)

edit your path download to run

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