cancel
Showing results for 
Search instead for 
Did you mean: 

How to pick a specific file to work on?

Lily.L
Level 5

Hi guys,

I have multiple files in the folder with the format name like this: "excel-yy-MM-dd....." , while yy-MM-dd is dynamic and will be changed day by day. How can I get the file with the current date?. For example: today is 2023-11-07. I have used the get file function but don't know what to do ... Thank you!

30839.png



------------------------------
Mia Mikela
------------------------------
1 REPLY 1

Hi Mia Mikela,

You can use filter collection to filter the files based on your requirement
1) get File  using Utility file - management Object
2) Create a  calculate stage and  add the static file name with Today date using FormatDate( Calculation stage in the screenshot  out put is "FileName)
ex: "excel-"&FormatDate(Today(), "yyyy-MM-dd")  
3) Create a filter statement ("Name like'"&[FileName]&"*'") -( I used  out put of this calculation stage as Filtered column)
4) Use filter action in utility filter  Object

30837.png



------------------------------
-----------------------
If I answered your query. Please mark it as the "Best Answer"

Harish Mogulluri
Lead developer
America/New_York TX
------------------------------
-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri