I am able to download the excel file from the website and storing into downloads section.
Once the file downloaded the file name will be InvoiceFrontPage then InvoiceFrontPage (1),
InvoiceFrontPage (2) and goes on.
In one execution only one file gets download.
How to pick the latest downloaded file and rename and then move to particular folder.
Please help me how to do this, thanks.
How about this expression?
sPathDownload | DataTable → String
sPathDownload = Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)+"\Downloads").[Select](Function(x) New FileInfo(x)).Where(Function(f) f.Extension.Equals(".xlsx")).OrderByDescending(Function(x) x.LastWriteTime).Take(1).ToArray()(0).ToString
Note → Update extension in the above query
Hi @lakshmi.mp ,
try to user “Wait for Download” activity
Hi @Gokul001 ,
Able to pick the latest file from downloads, how to rename the latest file to Tool dump file and then need to move to desktop folder Tool dump input.
Try with Move File activity
Check Out the XAML file
RenameFile.xaml (6.0 KB)
Can we do this path as dynamic by using (Environment.SpecialFolder.UserProfile)
Yes @lakshmi.mp , We can
@Gokul001 , @RajKumar_DC Thank you.
@Gokul001 able to run the latest file and renaming the latest file dynamically. Thank you so much for helping.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.