Output file in orchestrator job

Good afternoon.
I have a problem running a process from orchestrator.
The process should create a report upon completion, a report in .xlsx, but for some reason, when I go to the folder where the file should be there is nothing.
The job is marked as Successful, but I do not have the aforementioned file.
Running from UiPath Assistant the same thing happens.
The most curious thing is that if I run the same process from Studio, both in Run and Debug, it creates the file without problems.
I’ve even checked the Studio project dependencies and the package dependencies, and there are no changes, they are the same.
Does anyone have any idea why this happens?

You need to change the folder path. If you use Environment.CurrentDirectory the file will be created in the package folder. Change it to some other path, like a local or network drive folder.

Great!! Thank you so much.
Exactly what you said was happening.

I thought that using CurrentDirectory ensured that when I ran the process in any VM I would always have the files located.

How should I then create the path so that the output folder is created in the chosen location regardless of the machine that starts the process?

@Antonio_Perez

Encironment.currentdirectory when run from assistant and in unattended will use a different pth than the path in documents…generally c:\users\username\.nuget\packages\packagename\

It is advised to use any other path generally

You can try something liek C:\botfolder then you would see that

Cheers

You could use a Create Folder activity which creates the folder for you if it doesn’t exist (it doesn’t do anything if it already does).

1 Like

Thanks for your comment.
So the solution would be to create a folder in the root directory of the machine?
So regardless of the VM in which I execute the process, it will always be created where I want?

@Antonio_Perez

Kind of yes…

Or…you can use something liek this path.Combine("C:\users\",environment.username,"documents")

Whcihc eill store in user specific documents folder

Cheers

@Anil_G
Great!
Thank you very much!

I will follow your advice :upside_down_face:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.