Assignment 2 file Path Error

Hi All,
Capture181


While creating Report In Level 3 assignment, The saving file name is different in the temp folder then the what i have passing at time of saving. i have printed the ReportFilePath variable to check the file name. its different then the saving one. please help me in this. and check screenshot also.

thanks

@dilsher_khan,

Share the screenshot where you saving the file, It is added with a month name, you need to check that.

Thanks for reply
@Item is type of string containing month name.

@dilsher_khan,

Print all your paths in individual write line and check once,

  1. Write Line - Environemtn.CurrentDirectory
  2. Write Line - in_ReportsDownloadPath
  3. Write Line - “report-”+in_TaxID+“-”+in_Year.Tostring +“-”+item+“.csv”

Hi ,
its same, please check in screenshot

@dilsher_khan,

Oh okay, please give a try to check the file really exists in the directory you are looking for using a Path Exists with a file option in it.

  Path.Combine(Environment.CurrentDirectory, in_ReportsDownloadPath, "report-"+in_TaxID+"-"+in_Year.Tostring +"-"+item+".csv)

yeah file saved there but with different name, what i maention in 1st two screenshots.so file reading csv file using same path it shows could not find file.

@dilsher_khan,

If you are passing the same

 Path.Combine(Environment.CurrentDirectory, in_ReportsDownloadPath, "report-"+in_TaxID+"-"+in_Year.Tostring +"-"+item+".csv)

In both activities then it should work. While saving and reading it as csv file, to read it as a csv file which activity you are using?

yeah i’m using the same path for read and save,but it saving with different name , don’t know why. i am using read csv acitiviy

@dilsher_khan, while saving the file does “Item” has the value…?
Is there any duplicate file available in the directory?

This issue happens when the file is not completely downloaded. When only part of the report gets downloaded before the next activity starts the csv gets saved with a different file name.

As a test:
After the report is downloaded try adding a delay and see if that woks.

If it works fine, replace the delay with other relevant activities like On Element Appear.

there’s no duplicate file.


with same path which i have mentioned The file name should be
(Report-FR322345-2018-january.csv) but it saves it with Name
(Report-FR322345-1)

1 Like

@dilsher_khan,

Could you please share your workflow, I will check it from my end.

System1_CreateYearlyReport.zip (4.9 KB)

i think it took default file name while we are changing the saving path.
please check it once