Home » Questions » Computers [ Ask a new question ]

How to open Explorer window to show another PC's directory using command line

How to open Explorer window to show another PC's directory using command line

I want to make a shortcut/batch file to prompt for username/password and then for a specific directory to be opened in Windows Explorer. I'm using Windows XP.

Asked by: Guest | Views: 155
Total answers/comments: 2
bert [Entry]

"You could map the other directory to a drive letter, and then open it in explorer.
I don't recommend that you link to c:\, but if you need to...

LinkToFolder.bat (username and password need to be replaced with your username and password)

net use x: \\150.204.216.26\c$ password /USER:username
explorer x:\"
bert [Entry]

"You can map a random drive letter and get it:
@echo off
for /f ""tokens=2 delims= "" %%a in ('net use * \\server\share ^| find ""is now connected""') do set ""drive=%%a""
explorer %drive%"