21

I am using Windows Remote Desktop to connect to a server. I have enabled access to a local drive as per http://support.microsoft.com/kb/313292 but I'm trying to figure out how to access the drive from the command prompt.

As per the link the shared drive shows up as drive_letter on terminal_server_client_name but using that in the command prompt doesn't work.

Does anyone know of a way I can access this file from command prompt or power shell so I can script some stuff out?

Thanks,

Shane

2
  • It should come as \\hostname\drive - but can't confirm now
    – Sathyajith Bhat
    Feb 15, 2011 at 18:11
  • I tried that and it doesn't work which makes sense since that is actually a completely valid network address which I am not sharing.
    – ShaneC
    Feb 15, 2011 at 18:28

3 Answers 3

31
\\tsclient\X

where X is the drive letter.

2
  • 1
    What about the other way around? I can connect Computer A with an RDP. How can I map its C drive to a local drive on my computer (Computer B)?
    – Royi
    Mar 23, 2020 at 0:18
  • You can't do it "the other way around" with RDP. You need to use regular SMB for that. Aug 19, 2022 at 10:38
3

I have been looking for a simple way to do this too, due to a simple batch file I am scripting. You can access the location by mapping the network drive. Within your remote desktop Windows OS, go to Network > tsclient and right click the network drive and select "Map Network Drive". Now you can access it with the letter that is mapped to it.

-1

On the host command line (substitute your actual values where the bracketed stuff is): net use [choose an unused drive letter like M:] \\tsclient[drive letter on client]

Example: net use e: \\tsclient\e

2
  • Avoid posting answers to old questions that already have well received answers unless you have something substantial and new to add.
    – Toto
    Oct 25, 2022 at 17:33
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Oct 25, 2022 at 21:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .