Hi Friends,
How we take the files (Only todays date file )from folder.
Here files can be more than one.
How we can achieve this.
Thanks
Hi Friends,
How we take the files (Only todays date file )from folder.
Here files can be more than one.
How we can achieve this.
Thanks
Hi
Hope these steps would help you resolve this
— use a assign activity like this
arr_filepath = Directory.GetFiles(DestinationFilePath, “.”)
This will give array of file path
— now use a FOR EACH activity where pass the above array activity as input and change the type argument as string
— inside the loop use a IF condition like this
System.IO.FileInfo(item.ToString).CreationItem.ToString(“dd/MM/yyyy”).Equals(Datetime.Now.ToString(“dd/MM/yyyy”))
—if true it goes to THEN block where use a
ADD TO COLLECTIONS activity
Where in property
Mention the Collections as listfiles
Where listfiles is a variable of type System.Collections.Generic.List(of string)
With default value defined in variable panel as New List(of string)
And in item property mention as item.ToString
And change the Argument as string
Now this listfiles variable will have the file created for today
Now you can use this list variable in a for each loop and save anywhere you want
Cheers @Rup_1
New directoryinfo(yourpath).getfiles().where(function(x) x.creationtime.date=now.date).toarray
IT will Return an Array of Fileinfo objects of todays Files. Accessing the filepath can be Done by myFileInfoVar.FullName
Could look like this
Find starter help
Demo_GetFilesByXDate.xaml (6.0 KB)
Is this working fine @Rup_1
Cheers
Hi @Rup_1
Follow the Steps
Goto Filters and select the Studio X
Search for “For each file in folder” you can order by your requirements(In Your case “Last updated newest first”)
Hope it Helps
Regards
Sudharsan
Facing Error: ‘FileInfo’ is a type and ‘IO’ cannot be used as an expression
hi @vishnuvarthanp based on your suggestion i tried this method but facing an error: 'FileInfo’ is a type in ‘IO’ cannot be used as an expression inside if condition