Storing file in a location where Bot can access in different VMs/Machine

Hi

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.

Thanks,
Suganya. S

1 Like

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.

Thanks

3 Likes

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.

  1. Create a variable named FolderPath and assign the below statement to it
    C:\Users\USER_NAME\Downloads".Replace(“USER_NAME”,Environment.UserName)

  2. 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.

Hope it helps you.
Regards,

1 Like

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 ?

Thanks,
Suganya. S

1 Like

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

Thanks

3 Likes

No user can’t download bot has to download based on queue item once it is available.

Process is to get loan no from queue and search for details in web application and download the file just to convert that to base64 format.

Thanks,
Suganya. S

1 Like

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.

Thanks,
Suganya. S

1 Like