How to create a File with Timestamp in UiPath
Creating a file with a timestamp is a useful step in the business automation process.
Why we need it?
- In the automation process, we tend to create a consolidated report on a daily basis where you need to save that with DateTime timestamp to identify individual reports.
Let’s see how we can achieve this:
Activity Name: Create File
Where File location: The folder where you want to save the file.
File name: The file name which is used to save the file with that name.
Here System.DateTime.Now.ToString(dd-MM-yyyy) gives us the current system date and time like this (27-11-2020.txt).
Why don’t we use this System.DateTime.Now.ToString directly?
Because while creating a file you need to avoid special characters.
This is how we create a file with timestamp in UiPath.