Copy and paste inside rdp?

Hi,

Is there anyway we can copy and paste inside RDP connection?
The problem i am automating is that I have to login to RDP then goto shared location check the file if it exists then move that file to some folder in C drive. I have to do all this in RDP.

1 Like

hey

did you try using hotkeys?

regards

Hey @rameezimtiaz

You can perform the same in various ways,

  1. Use hot keys to perform the manual steps through bot

  2. Create a desktop shortcut manually and train the bot to click directly on that shared folder and check the results

  3. Create a script file which can check and just execute it with shortkeys or click which will make it simple

Hope this helps

Thanks
#nK

I am trying to do it with invoke powershell activity and with the following command

‘Copy-Item -Path \Inbound\3mcgs_04022022.txt -Destination C:\Input\ -PassThru’

The file name 3mcgs_04022022.txt needs to be a variable. The error i am getting is as follows

20.4.1

Source: Invoke Power Shell (Throw)

Message: The module 'Copy-Item -Path ’ could not be loaded. For more information, run 'Import-Module Copy-Item -Path '.

Exception Type: System.Management.Automation.CommandNotFoundException

RemoteException wrapping System.Management.Automation.CommandNotFoundException: The module 'Copy-Item -Path ’ could not be loaded. For more information, run 'Import-Module Copy-Item -Path '.
at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

1 Like

Hey @rameezimtiaz

This looks like a powershell code error.

Please include that import module code mentioned in the error message.

This should resolve the issue and try running it once manually to see if that is running & then it can be integrated with UiPath.

Thanks
#nK

@rameezimtiaz Please go through the below thread

Sometimes when I try to copy a file from my local computer to a Remote Desktop session, the option to paste doesn’t work. Here are some things that can work:

We can so changes from the Client Side:

  1. Right-click on the RDP icon that you use to connect, then select “Edit“.
  2. Select the “Local Resources” tab.
  3. Check the “Clipboard” option. To allow file copying and pasting, select “More…” and proceed to step 4. If you just need the ability to copy and paste text and not files, stop here and click “OK“.
  4. Select the “Drives” option. Click “OK“, then “OK” again.

From Server Side we can enable it by these steps:

  1. Launch “gpedit.msc“.
  2. Navigate to “Computer Configuration” > “Administrative Templates” > “Windows Components” > “Remote Desktop Services” > “Remote Desktop Session Host“.
  3. Ensure “Do not allow Clipboard redirection” is set to “Not Configured” or “Disabled“.

Above steps are for Windows 2016 which I have on my system. This should be all you need to enable copying and pasting of files between your computer and a Remote Desktop.