How to save csv file with current date time in a specific folder

hey guys ,

I have a query related to CSV file,

So I want to save the CSV file that are generated after some specific steps , with current date time ,

so current date time is done , but I am not getting how to save all the CSV files to a specific folder.

C:\Users\rishabh.verma\Documents\UiPath\DR Test Data Validation\Report Files

@rishabhverma, your file path should be like this:

“Folder_Name\ DateTime.csv”

This will save the file inside the folder you specified

unless if you want to save each CSV in its specific folder?


Hi , I want to save it with current date time , Not with name “datetime” .
Can you please write the whole line , if i want to save it in “Report Files” folder
C:\Users\rishabh.verma\Documents\UiPath\DR Test Data Validation\Report Files


"C:\Users\rishabh.verma\Documents\UiPath\DR Test Data Validation\Report Files\"+DateTime.Now.ToString("dd-MM-yyyy-hhmmss")+".csv"

The below is best practices, even if you move your project folder it will not break, but if you use the above you would have to change the path all the time.

"Report Files\"+DateTime.Now.ToString("dd-MM-yyyy-hhmmss")+".csv"


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