Skip to content
mnaoumov.dev
Go back

How to reach unreachable or copy files to RDP - Part 2

Part 1

When I tried to transfer 7mb of binary file using the approach from the part 1, it took so long, so I could not complete it.

Then I had to switch to more efficient base64 conversion

With that approach I immediately converted my 7mb binary to 10mb of base64 text file.

But when I tried to copy-paste it via clipboard over RDP, it hanged. I tried notepad and wordpad.

Then when I tried to split 10mb into 1mb chunks and copy-paste them, I could do that with wordpad. After paste it hanged 15-20 seconds. Then I could copy-paste next chunk. Needless to say, that was very annoying to jump back and forward to copy the whole file.

So I came up with an idea which I am going to implement and write in the next blogpost.

The idea was to run two PowerShell scripts: one on the host machine, second - on the RDP machine. Then copy-paste file by chunks and detect clipboard changes. Having this approach we can choose chunk size small enough to have RDP paste without hangs. Then by changing clipboard we notify host machine that RDP machine is ready for the next chunk.

So I see it as a client-server application driven by clipboard :)

Please stay tuned to see how I’m going to implement that…


Share this post on:

Previous Post
Efficient Base64 conversion in PowerShell
Next Post
PowerShell Resolve-Path Safe