Save File To Remote Desktop

Hi everyone,

I am building a robot which first runs an API call for downloading a PDF file in byte array format. Now my need is to create a PDF file from this byte array to the Remote Desktop. The bot will be running on my local system and then RDPed to another system where this PDF file needs to be saved. Any ideas how that can be achieved?

Thank you in advance!

Go through th below article on how to convert :

For the movement of the file create a folder on your RDP machine where you want to save the PDF and then share that folder with your local system, create the bot and then just use the move file activity and provide the folder path of the remote machine folder which you just shared

Hope this helps :slight_smile:

1 Like

Hi @Ishan_Shelke thanks for your reply.

I am able to create the pdf file using byte array to my local system. The only thing I need to know about is the shared folder thing. I need to know how can we share a remote machine folder with the local machine so that we can save the files there directly when the robot runs. Can you please share any article/blog related to that if possible?

Just go through the above video :slight_smile:

1 Like

Hi @himanshu_punj1 ,

Check this:

Regards,

1 Like

Thanks for the reply. I am curious is there any command prompt command exists to create a file from the byte array.

Hi @himanshu_punj1

No, there is no built-in command prompt command to create a file from a byte array. However, you can write a simple script in a programming language such as Python or PowerShell to create a file from a byte array.

Here’s an example script in Python:-
byte_array = [0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64] # Replace this with your byte array
file_name = ‘output.txt’ # Replace this with the desired file name

with open(file_name, ‘wb’) as file:
file.write(bytes(byte_array))

This script creates a file named “output.txt” in the same directory as the script and writes the byte array to the file.

1 Like

Hi @Nitya1 what I did is, created an exe file accepting arguments for custom data and stored it on the remote PC. When the automation runs it opens cmd and run this exe file with the arguments provided. That is still a workaround but served my need!

2 Likes

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