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

ShaneC
  • 315
  • 1
  • 2
  • 5

3 Answers3

31
\\tsclient\X

where X is the drive letter.

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966
  • 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 '20 at 00:18
  • You can't do it "the other way around" with RDP. You need to use regular SMB for that. – u1686_grawity Aug 19 '22 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

NHTG
  • 1
  • 1
  • Avoid posting answers to old questions that already have well received answers unless you have something substantial and new to add. – Toto Oct 25 '22 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](/help/how-to-answer). – Community Oct 25 '22 at 21:33