By Ellie / Last Updated June 17, 2022

How do I copy RDP file via command line on Windows 11, 10?

“I am wondering if it’s possible to do something within Windows to RDP a file from one machine to another via PowerShell on Windows 11, 10. If it is, how can I do this?”

How to copy files over RDP via command line on Windows 11, 10

To copy files over RDP, you need first to configure Remote Desktop Connection to make your local drives available when you connect to a remote computer. Then you can access local drives from a command line in a remote session. Let’s see the detailed guide on how to copy files over RDP via command line.

 Step 1. On the client computer, search for Remote Desktop Connection in the Search box. And then open it.

Remote Desktop Connection

Step 2. On the main interface of Remote Desktop Connection, switch from the General tab to the Local Resources tab, and in the Local devices and resources column, click More.

Local Resources More

Step 3. On the Local Devices and Resources interface, check the Drives and click OK.

Check Drives

Step 4. Go back to the General tab. Enter the IP address and user name in the Remote Desktop Connection interface to achieve connection. (The detailed steps to find the IP address and user name will be introduced later in case you don’t know how to find them.)

General Tab

Step 5. Within the Remote Desktop Connection session, your local drives appear in Windows Explorer of the remote computer with the following designation:  

Drive Redirectin

Step 6. Run PowerShell inside of your RDP session, and run a simple net use command. You will see the redirected drives appear.

Net Use Command

Step 7. Run a simple net use \tsclient to map these drives in a true sense to a network drive letter.

Tsclient

Step 8. Now if you look in Windows Explorer, you will see a true network drive mapped under your Network Locations section. During the remote session, if you copy files to the mapped drive on the remote computer, you can find the files in the same drive on your local computer.

An easier way to transfer files between remote computers

Copying files on remote desktop via command line isn’t the common way to achieve file transfer as using command line is a little bit tech-demanding. If you want an easier way to transfer files between remote computers, you can use AnyViewer, a free and fast file transfer tool. For example, it only costs about 20 seconds to transfer a 2 GB zip file from the local to the remote computer.

Step 1. Download, install, and launch AnyViewer 3.0 on both Windows computers. If your version is lower, please upgrade first. 

Download Freeware Win 11/10/8.1/8/7
Secure Download

 Step 2. On the Controller computer, go to Log in, and then click Sign up. (If you already have signed up on its official website, you can log in directly.)

Log in AnyViewer.png

Step 3. Fill in the signup information.

Sign Up For AnyViewer

Step 4. Then you can see you successfully logged in to AnyViewer. Your device will automatically be assigned to the account you’ve logged in to. 

Free Editions

Step 5. Choose your target computer, and then click File Transfer.

File Transfer AnyViewer

Step 6. Then a File Transfer dialog box will appear. The path of the Controller computer is shown on the left of the box, and the path of the Recipient computer is shown on the right. You’re able to transfer files between devices freely by clicking the arrows after choosing the target files.

Choose Files

Step 7. You can see the transfer status at the bottom of the File Transfer dialog box. Right-click to pause or remove the transfer task. The dialog can be closed when the transfer is complete.

Transfer Status

Note: The maximum size of a single file that can be transferred for the free account is 100 MB, and the maximum number of files that can be transferred per time is 100. If you want to transfer larger files in more quantity per time, please upgrade to a Professional or Enterprise plan. What can a professional or enterprise plan brings to you:

Faster transfer speed. Transfer speed for a free account is 500 KB/s, and for a paid account is up to 10 MB/s.
Increasing number of files transferred in bulk.
Larger size of a single file that can be transferred.
More devices can be assigned to the same account for unattended remote access.
More Currently connected devices are displayed for management.
Connect in privacy mode to protect privacy.

Conclusion

This post primarily introduces how to copy files over RDP via command line. Although the whole process looks not very complicated, it is not a common way to perform Remote Desktop copy files on Windows 10 via command line. Therefore, we recommend AnyViewer to you to help you transfer files between remote computers in a much easier way. Try it if you’re interested.