Wednesday, January 12, 2011

Remote Desktop: Cannot copy file: Cannot read from source file or disk

Back in February I wrote about some insight I gained while trying to finally troubleshoot why copy and paste would sometimes not work between a workstation and an RDP session.

Well, I recently started running into this error message while trying to copy a file from my workstation to an RDP session:

Cannot copy file: Cannot read from source file or disk

I tried killing and restarting rdpclip, but that didn't help.  I then double checked that my local drives were mapped to the RDP session, which they were.  And I verified that the Clipboard was enabled in my RDP connection.  I even went back to my blog post and re-read my own tips and the Microsoft tips, but I seem to have covered everything, including restarting the remote server.  But I would still occasionally get the error.

After several minutes of trying to figure out the cause of the error, it finally dawned on me.

I use TrueCrypt on my workstation to encrypt sensitive files, such as employee or payroll source data files that are required for integrations.  When you mount a TrueCrypt volume, it becomes a new drive on your machine--in my case, it happened to be the S: drive.

So, the problem was that I was first connecting to my RDP session, which did map all of my local drives.  But I then later mounted my TrueCrypt volume, which created my S: drive.  Naturally, the RDP session didn't have an S: drive mapped.

Since I was trying to copy a file from my local S: drive to the RDP session, and since my S: drive was not mapped via RDP, the file copy would fail with the error message.  Obviously this isn't an issue if your drive letters are fairly static, but since I don't regularly keep my TrueCrypt volumes mounted and only mount them when necessary, the S: drive isn't a regular actor on my machine.

One simple, but slightly annoying workaround is to copy the files from the unmapped drive to a mapped drive on the local workstation (such as copying to your desktop, which would put the files on your C: drive), and then copying from that drive to the RDP session.

Alternately, if your RDP connection is setup to map the drive once it is created, disconnecting and then reconnecting to the RDP session should work.


Steve Endow is a Dynamics GP Certified Trainer and Dynamics GP Certified Professional.  He is also the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

http://www.precipioservices.com

2 comments:

Anonymous said...

Glad to hear that you discovered what the issue was. Security measures can often be problematic when working with Remote Desktop connections. Usually, a vast majority of problems can be attributed to firewall issues. However, (as you demonstrated) this is not the only security measure that can cause remote access problems.

Online Ustaad said...

I had the similar problem and faced it a lot of times. I often solve this type of problems using "Long Path Tool". It helped me in solving this error and all related errors. I hope you will also love it.