Get Latest Files in Directory

Hi,

i have list of file on daily basis received in the Directory to get the today recievied file to processed. i dont want process other file.

To be process file : 20220425 date…

Directory Files (Input)

How to get the file ?

Thanks
Shyam

one of the simplest quick shots could done with filter masks

arrFiles = Directory.GetFiles(YourPath, "*20220425*")

Surely, we also do have other options as well

Hi @ppr

different type of files in the directory. to process each file having seperate sequence…

i created the seperate sequence for each process using readcsv activity for each process… i have merge to single sequence for get the files.

on daily Basis manully changing the input file path…

Thanks
Shyam

@Shyam_Pragash Manually how do you identify the specific files belongs to Today’s run. Is it based on the date on the file name or how

as mentioned we can handle as well. eg. with a more specific mask or a filtering afterwards with a LINQ. Also have a look here on some API samples:

[CheatSheet] - Filesystem APIs - News / Tutorials - UiPath Community Forum

Hi @ushu

there is word contains each file having and daily date… to be used to get the files…

Thanks
Shyam

Hi…

i tried to get the files.

image

output
image

i want to get all latest date file… one by one…

Thanks
Shyam

Hi All…

Thanks you…

I found Solution

Output…

image

Thanks
Shyam

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