I think you kept underscore in wrong place…try below expression. And if it not work share the sample file full path so that we could help you better. Thanks.
If you want latest downloaded zip file name from downloads folder. Please use below expression. After that you could concat this latest file name to your downloads folder and check for file exist if you want. Try and let me know. Thanks.
Directory.GetFiles(your downloads folder path).[Select](Function(x) New FileInfo(x)).Where(Function(f) f.Extension.Equals(“.zip”)).OrderByDescending(Function(x) x.LastWriteTime).Take(1).ToArray()(0).ToString()
File name SpotsReport_20_12_2021_4567865
SpotsReport is same on daily report
20_12_2021 date is changing daily according to current date
4567865 this number is system generated and in simple terms its a random number.
now when I’m using this code
“Ftp_folder_path/”+ToString(“MMMMyyyy”)+“/SpotsReport_”+Today.Tostring(“dd_MM_yyyy_”)+“4567865.zip”
then I’m able to fetch the file but when I’m trying to use whildcard, it says file not exist.
ok on FTP server, there’s a folder by month+year (December2021) in this folder there’s are reports which upload on daily basis
format of file name - SpotsReport_20_12_2021_4567865.zip
SpotsReport is same on daily report
20_12_2021 date is changing daily according to current date
4567865 this number is system generated and in simple terms its a random number.
I need to download the latest file and only one single file.