From download location i need to send the todays pdf file new folder how?

From download location i need to send the todays pdf file new folder how can i do it? it is possible to do it

@Naveen_Kanike,

Yes, it’s possible. Is it Downloads folder or any other folder?

Thanks,
Ashok :slight_smile:

Hi Ashok

how can i do it

@Naveen_Kanike

downloadFolder (String) = "C:\path\to\download\location"
newFolder (String) = "C:\path\to\new\folder"
today (DateTime) = Now.Date
filesMoved = Directory.GetFiles(downloadFolder, "*.pdf").Where(Function(f) New FileInfo(f).LastWriteTime.Date = today).ToList().ForEach(Sub(f) File.Move(f, Path.Combine(newFolder, Path.GetFileName(f))))


Hi @Naveen_Kanike

Use the below syntax to get the latest file:

todayFiles = System.IO.Directory.GetFiles("yourFolder","*.pdf").Where(Function(s) System.IO.File.GetCreationTime(s).Date=DateTime.Today).ToArray()

After that use Move file to move it to the particular folder.

Hope it helps!!

@Naveen_Kanike,

Follow this approach.

Sample code:
Send Downloads.xaml (18.5 KB)

Thanks,
Ashok :slight_smile:

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