Want to get the file name from download panel

I want to get the file name. Screenshot is attached.
Issue is i am using get text but its selecting the whole panel and i am not getting the file name. Please help me in this.

@Puneet_Singh1

if you want to get the file name of the file which is downloaded ,use this

str_filepath=system.io.Directory.GetFiles(“pass the Downloadsfolderpath here”).OrderByDescending(Function(f) new FileInfo(f).CreationTime).First

use another assign activity for file name

str_filename=path.getfilenamewithoutextension(str_filepath)

Hi @Puneet_Singh1

Syntax : Directory.GetFiles(“C:\Users\Cogni\Downloads”).OrderByDescending(Function(r) new FileInfo(r).CreationTime).First

Cheers!

Not Working

@Puneet_Singh1

please type the syntax manually once and check it

don’t copy and paste

Same error with your code

ensure you give the correct folder path

Directory.GetFiles(“Folder Path”).OrderByDescending(Function(r) new FileInfo(r).CreationTime).First

@Puneet_Singh1

its better to pass the folderpath to an variable

StrFolderpath=“provide Your path”

str_filepath=system.io.Directory.GetFiles(StrFolderpath).OrderByDescending(Function(f) new FileInfo(f).CreationTime).First

1 Like

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