i am new and i need help for creating a Directory. The Name of this Directory should be the time of today.
I get a daily email and this email includes attachements. So, now i want to save these attachements in a directory on my desktop with the name of todays date (e.g). Better how can i create a directory with date and time as name.
Is this possible in UiPath or is there any other Options?
If you create a variable to hold the file name or just write it straight in the activityās property you can use āDate.Nowā which depending on Cultural settings will output āMM/DD/YYYY HH:MM:SSā (Iām on English US Windows). Worth mentioning you will need to use Date.Now.ToString since itās of type DateTime.
pass this for file name:
now.tostring(āddMMyyy_HHmmssā)
if your trying different format make sure you are not including any slashes(\ /) or Colon(: )
But can you give me an Example ? Like, how it could look like? Or how i can Create a simple directory with date, specially how the path will look like?
here you go:
in activity pane search for activity named Create Directory then in path field in property pane pass this- Environment.GetFolderPath(Environment.SpecialFolder.Desktop) &"\ " & now.tostring(āMMyyy_HHmmssā)