When you connect to your VPS via Remote Desktop, you can redirect your local drives so they appear inside the remote session. This is built into RDP and requires no additional software. But sometimes you need those redirected drives mapped to actual drive letters inside your VPS — for example, if an EA or script expects files at a specific drive path. Here is how to do both.
If you have not connected to your VPS yet, start with our guide on how to access your VPS using RDP before following these steps.
Step 1: Enable Drive Redirection in RDP
Before connecting, open your Remote Desktop Connection settings and enable local drive sharing:
💡 Tip: Mapping a local drive through RDP lets you drag and drop files between your PC and VPS without third-party tools. Enable “Local Resources > More > Drives” in RDP settings before connecting.
- Open Remote Desktop Connection (mstsc.exe)
- Click Show Options to expand the settings
- Go to the Local Resources tab
- Under “Local devices and resources”, click More…
- Check the drives you want to share (e.g., your C: drive)
- Click OK and connect to your VPS
Once connected, your local drives appear in Windows Explorer on the VPS under Devices and drives, labeled as C on YOURPC (where YOURPC is your local computer name).
Step 2: Map Redirected Drives to Network Drive Letters
The redirected drives use a special UNC path format: \\TSCLIENT\C (where C is your local drive letter). You can map these to real network drive letters using the net use command.
Open Command Prompt on your VPS and run:
net use Z: \\TSCLIENT\C
This maps your local C: drive to Z: inside the VPS. You can verify by running:
net use
The mapped drive now appears as a proper network drive under Network Locations in Windows Explorer.
💡 Tip: Save your VPS connection as an .rdp file on your desktop for one-click access. Include the port number in the saved config so you never have to type it again. You can also adjust your RDP resolution in the same saved file.
Making It Persistent
By default, net use mappings disappear when you disconnect. To make the mapping persist across sessions, add the /persistent:yes flag:
net use Z: \\TSCLIENT\C /persistent:yes
Note: This only works if you reconnect with drive redirection enabled each time. If you connect without enabling local drives, the persistent mapping will fail until you re-enable it.
Auto-Map Drives on Login With a Batch Script
If you regularly need the same drive mapped every time you connect, you can create a small batch script that runs automatically at login. This saves you from typing the net use command manually each session.
- Open Notepad on your VPS
- Paste the following script:
@echo off
REM Remove any stale mapping first
net use Z: /delete >nul 2>&1
REM Map local drive to Z:
net use Z: \\TSCLIENT\C
echo Drive Z: mapped to local C: drive.
- Save it as
map_drives.baton your VPS desktop - Press Win + R, type
shell:startup, and press Enter - Copy or move
map_drives.batinto the Startup folder that opens
Now every time you log in via RDP with drive redirection enabled, the script will automatically map your local C: drive to Z: on the VPS. If you need multiple drives, add extra net use lines (e.g., net use Y: \\TSCLIENT\D).
Security Considerations
Sharing drives over RDP is convenient, but you should be thoughtful about what you expose to the remote session.
- Do not share your entire C: drive unless you genuinely need full access. Your C: drive contains your operating system, personal files, browser data, and saved passwords. If the VPS were ever compromised, an attacker could read anything on the shared drive.
- Share specific folders instead. In the RDP “More…” dialog, expand your C: drive and check only the folders you actually need — for example, a dedicated
Trading Filesfolder on your desktop. - Disconnect drives when not in use. If you only need the mapped drive for a quick file transfer, unmap it afterward with
net use Z: /delete. The fewer resources you leave exposed, the smaller your attack surface. - Be cautious on shared or public networks. RDP traffic is encrypted, but the redirected drive data still travels over your internet connection. Avoid transferring sensitive files over untrusted Wi-Fi.
For additional protection, always properly disconnect your RDP session when you are finished rather than simply closing the window. An open session with mapped drives is a larger target than a fully disconnected one.
Practical Uses for Traders
- Deploy EAs and indicators — copy files from your local development machine directly to the MT4/MT5 data folder on your VPS without using file transfer services
- Backup trade journals — automatically save trade logs from your VPS to your local drive. For a more comprehensive approach, see our guide on how to back up your forex trading data on a VPS
- Transfer configuration files — move custom templates, chart profiles, or preset files between machines
- Quick file access — browse your local files from within the VPS without switching windows
This method works from any device that supports RDP drive redirection, including Windows and Mac. If you are connecting from a Mac, our guide on how to copy files from Mac to your VPS covers the specifics for Microsoft Remote Desktop on macOS. You can even connect from mobile — see how to RDP from Android.
Troubleshooting
Drive does not appear after connecting? Make sure you checked the drive in RDP settings before connecting. You must disconnect and reconnect for changes to take effect.
“System error 67” when mapping? This means drive redirection is disabled on the VPS server side. Contact your VPS provider to enable it — FXVPS has drive redirection enabled by default on all plans.
Slow file transfers? Drive redirection sends data over your RDP connection. Large files will transfer at your internet upload speed, not LAN speed. For large transfers, consider using SFTP or a cloud sync service instead.
“The network name cannot be found” error?
Double-check that you typed the UNC path correctly — it must be \\TSCLIENT\C with two leading backslashes and no spaces. Also confirm that the specific drive letter you are trying to map was checked in your RDP settings before connecting.