Path problem level 3 assignment 2

i should save my file in this path data_Temp but it’s saved in anther one wish is not my current path
path = path.Combine(Environment.CurrentDirectory, in_ReportsDownloadPath, “Report-” + in_TaxID + “-” + in_Year + “-” + month + “.csv”)
any help

Hi @manal_el_maalem

usually, when you use Environment.CurrentDirectory in a UiPath project it should give you the full path of the current working directory of your related UiPath project.
If you want to use another location you have to change Environment.CurrentDirectory by a string with this full path.

Use String.Format() method instead of in_ReportsDownloadPath, “Report-” + in_TaxID + “-” + in_Year + “-” + month + “.csv”) and make sure the result of combine string dont start with “/”.
fileName= String.Format("{0}Report-{1}-{2}-{3}.csv",in_ReportsDownloadPath,in_TaxID,in_Year,month)


Thanks @dunglt

Your solution resolved my problem.

1 Like