Hi, I want to download a latest file from the FTP folder, it’s name is changing on daily basis but file first name is same (e.a. file name is XYZ_16_08_2021_085841, so XYZ is same on daily basis)
I wish to download the file base on latest uploaded file and if there is no upload then it won’t download. (it won’t download the yesterdays file or the file in which we have already worked on)
Hey,
Unfortunately, UiPath actions don’t provide such this possibility. You have to download the files to some temporary folder first and then check if the filename meets your condition.
I am not sure but you can give it a try and let me know if it works.
Use the download activity of FTP package and try to place the following code in remote path Directory.GetFiles(yourfolder_path,"*.txt").OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)
where youfolder_path is your remote location.