Ora

How to copy file from remote server to local machine windows?

Published in File Transfer Remote to Local 5 mins read

To copy files from a remote server to a local Windows machine, you can use several methods, primarily depending on how you connect to the remote server and the security protocols in place. The most common approaches include using Remote Desktop Protocol (RDP), Secure File Transfer Protocols (SFTP/SCP), network shares, or cloud storage solutions.

Here's a breakdown of the methods:

1. Using Remote Desktop Protocol (RDP)

If you connect to your remote server via Remote Desktop (mstsc.exe), you can leverage its built-in features for file transfer, namely clipboard sharing and drive redirection.

Enabling Clipboard and Drive Redirection

Before connecting, configure your RDP client to allow file transfers:

  1. Open Remote Desktop Connection: Search for mstsc.exe in the Windows Start menu or Run dialog, and open it.
  2. Show Options: Click on "Show Options" in the bottom-left corner.
  3. Local Resources Tab: Navigate to the "Local Resources" tab.
  4. Enable Clipboard: Under "Local devices and resources," ensure the "Clipboard" checkbox is selected. This allows you to copy and paste text and files between your local and remote machines.
  5. Enable Drive Redirection (Optional but Recommended): Click on "More..." under "Local devices and resources."
    • In the pop-up window, select "Drives" to allow access to all your local drives from the remote machine. You can also expand "Drives" and select specific drives if preferred.
    • Click "OK" to save the changes.
  6. Connect: Proceed to the "General" tab, enter the remote server's IP address or hostname, and click "Connect."

Copying Files via RDP

Once connected to the remote server with clipboard and/or drive redirection enabled:

  • Using Copy-Paste (for smaller files/folders):
    1. On the remote server, navigate to the file or folder you wish to copy.
    2. Right-click the file/folder and select "Copy."
    3. On your local machine (outside the RDP window, or inside the RDP session if navigating to a redirected local drive), navigate to the desired destination folder.
    4. Right-click and select "Paste."
  • Using Redirected Drives (for larger files/folders or multiple transfers):
    1. On the remote server, open "This PC" or "My Computer."
    2. You will see your local drives listed under "Redirected drives and folders" (e.g., C on YOUR_LOCAL_PC_NAME).
    3. Simply drag and drop files directly from the remote server's file explorer to your redirected local drive, or vice versa.

Troubleshooting RDP Clipboard Copy-Paste Issues

If you experience issues with copy-paste functionality not working after connecting via RDP, the rdpclip.exe process on the remote server might need to be restarted.

Step Action (On Local Machine) Action (On Remote Server)
1 Ensure clipboard is enabled in your Remote Desktop Connection settings. Go to mstsc.exe -> "Local Resources" tab -> check "Clipboard." N/A
2 N/A Open the Run dialog by pressing Windows Key + R.
3 N/A Type cmd and press Enter to open Command Prompt.
4 N/A In the Command Prompt, type Taskkill.exe /im rdpclip.exe and press Enter. You should see a "Success" message indicating the process was terminated.
5 N/A Immediately after, type rdpclip.exe in the same Command Prompt and press Enter to restart the clipboard process.
6 Test Your copy and paste functionality between the local and remote machines should now be working correctly.

2. Using Secure File Transfer Protocols (SFTP/SCP)

For more robust and secure file transfers, especially when RDP is not used or for server administration tasks, SFTP (SSH File Transfer Protocol) or SCP (Secure Copy Protocol) are excellent choices. These require an SSH server running on the remote machine.

Common Tools

  • WinSCP: A popular free and open-source SFTP, FTP, SCP, and WebDAV client for Windows. It provides a graphical user interface similar to a file manager.
  • FileZilla: Another widely used free FTP, FTPS, and SFTP client. It also offers a dual-pane interface for easy drag-and-drop transfers.

Steps for SFTP/SCP Transfer (General)

  1. Install a Client: Download and install WinSCP or FileZilla on your local Windows machine.
  2. Connect to the Server:
    • Open the SFTP client.
    • Enter the remote server's hostname or IP address, username, password, and the SSH port (default is 22).
    • Click "Connect."
  3. Navigate and Transfer:
    • The client typically displays your local files on one side and the remote server's files on the other.
    • Navigate to the desired files on the remote server and the destination folder on your local machine.
    • Drag and drop the files from the remote server pane to your local machine pane, or use the "Download" button/option.

3. Utilizing Network Shares (SMB/CIFS)

If your remote server is on the same local network or accessible via a VPN, and has folders shared using Server Message Block (SMB/CIFS), you can map them as network drives on your Windows machine.

  1. Ensure Sharing is Enabled: On the remote server, ensure the folder you want to access is shared with appropriate permissions.
  2. Map Network Drive:
    • On your local Windows machine, open "This PC" or "My Computer."
    • Click "Map network drive" in the ribbon menu (or right-click "This PC" and select "Map network drive").
    • Enter the network path to the shared folder (e.g., \\RemoteServerName\SharedFolder) and provide credentials if prompted.
    • Once mapped, the shared folder will appear as a regular drive on your local machine, allowing easy drag-and-drop file transfers.

4. Cloud Storage or Online File Sharing Services

For occasional transfers or when dealing with very large files, using a third-party cloud storage service (like OneDrive, Google Drive, Dropbox, etc.) or a dedicated file sharing service can be an alternative.

  1. Upload to Cloud: On the remote server, upload the files to your chosen cloud storage service.
  2. Download from Cloud: On your local Windows machine, access the same cloud storage service and download the files.

Choosing the right method depends on your specific setup, security requirements, and the frequency of file transfers.