Append / Include Time and Date into downloaded PDF files name


I am trying to append the time and date to each file that I download which is a PDF file being downloaded directly from a website through an HTTP request. It’s going to be 1 file a day only on weekdays. Can y’all suggest how I can place it in the folder with the following naming scheme:
File <02-07-2018 04:00 PM CST>
File <02-08-2018 04:00 PM CST>
File <02-09-2018 04:00 PM CST>
File <02-010-2018 04:00 PM CST>

@paragdhameja, You can follow this to name a file in date and time format,

Rename File and Filename should contain current date and time

Dominic :slight_smile:

1 Like

Hi @paragdhameja,

Using Http Request activity In properties you need to give the Resource Path
For example
"D:\uipath\Project 1\merge\Download.pdf"
"D:\uipath\Project 1\merge\Download"+DateTime.Now().ToString("yyyy-MM-dd HH:mm tt")+".pdf"



I’m fairly sure you can not use “:” in the filename. Correct me if I’m wrong though. Usually you need to use “.” instead or no punctuation between the date time.

1 Like

Hi @ClaytonM,

you are right we can’t give Folder name with “:” , so better we can use “.” or “-

Thanks @ClaytonM,

D:\uipath\Project 1\merge\Download"+DateTime.Now().ToString(“yyyy-MM-dd tt”)+".pdf



Thanks very much y’all !