My issue is i need to download a file and store in a location.
I’m able to download it and store in local.
I Used to download in UiPath process folder “Data\Output\Filename.pdf”. It is working in my machine.
My bot is deployed and if i trigger to run in different machine from orchestrator, its getting failed.
Assign Bytes Array: Could not find a part of the path ‘C:\Users\XXXX.nuget\packages\previewinitialdisclosure\1.0.8\content\Data\Output\PreviewDocuments\92302xxxxx_07-02-2023_111534.pdf’.
Please help me on this, i need temporary location to store which is accessible across different machines and there is no shared drive, so kindly suggest other ways.
Try to provide the full path for a file. And if there is no shared drive or network path then you cannot share across different machines instead you can use outlook to send through emails.
One way you can do this is to ask the user to download the file in their machines, if that is possible in your case, the bot can access their downlods folder and get the file from there.
lets say they download files in Downloads folder and then run the bot then you can use environment varibales to access the machine’s downloads folder, you then have to get the file from there. by assigning the folder path in a variable
Use this in assign activity to a variable and then use this path to access your file.
Create a variable named FolderPath and assign the below statement to it C:\Users\USER_NAME\Downloads".Replace(“USER_NAME”,Environment.UserName)
Create a variable lets say FileName and assign the following statement to it String.Join(“parameter”,Directory.GetFiles(FolderPath,“*.pdf”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Take(1))
the variable FileName will get the file for you from any machine that the user is using automation from.
My Folder is like this “Data\Output\PreviewDocuments\filename.pdf”
I thought this is in process package so this data folder will be available in all Machine.
Mail Option is not needed now because i’m downloading this file and converting the content to base 64 format to send through api call and deleting the file, so file can be stored during run time ?
No, when you upload the package to the orchestrator it will be available to install on respective machines.
Once you install using UiPath assistant then only that package will be available on the machine but not on all machines. You need to install on those once on all machine
ya if i install the file path is getting changed like this C:\Users\XXXX.nuget\packages\previewinitialdisclosure\1.0.8\content\Data\Output\PreviewDocuments\92302xxxxx_07-02-2023_111534.pdf’. thats why bot is failing to find the path through file explorer window to store the file.