Absolute path not recommended

"C:\Rasi\Rob\Pub\Report"+date.now.toString(“yyyy”)

i want to create a folder here with year
but iam getting error as Absoulte path not recomded use relative path instead

my project location is in documents

@T_Y_Raju,

It’s not an error! It’s just warning to follow best practice. You can ignore it.

Thanks,
Ashok :slight_smile:

when executing gives validation error

@T_Y_Raju,

If you don’t want that warning sign, just declare a string variable, assign this absolute path to the variable, pass this variable to the activity which is giving this warning.

Thanks,
Ashok :slight_smile:

@T_Y_Raju,

If it’s giving you error then your workflow analyzer could have configured that way to mark it as error.

I tried to replicate this but I’m able to run without error.

Try this way:

image

Thanks,
Ashok :slight_smile:

@T_Y_Raju

"C:\Users\rlgandu\Documents\UiPath\Magyar VZB\"+DateTime.Now.ToString

Is Report is a already existing folder or you want to create a report along with date please check that point once

image

yes im checking with path exists

Hie @T_Y_Raju this is not the error it just showing waring message if you don’t want this type of waring instead passing hardcode path save into the variable and inside create folder pass the variable + current year method i"m attaching method for this.

cheers Happy Automation