10

I need to connect to a network share with path \\192.165.24.175\04_Top_Image and need to use cmd to cd into it, but I don't know how to cd into it.

I know how to go from C: to D:, but it doesn't work for a network share, and while I've tried to look this up, I can't find anyone talking about it.

Tuor
  • 291
ToMakPo
  • 335

3 Answers3

14

I need to connect to a network drive with path \\192.165.24.175\04_Top_Image

One or all of these methods should work, as once mapped, you can cd to it just like any folder or access it via the Explorer tree:

  • Open Explorer and browse to the Network Section to see if you see the folder; if so, open it and answer any credential requirements

  • In Explorer, open the left side tree so you can see Network, then right-click on it and select Map Network Drive
    • In sub-window, enter the drive letter (your choice) and in the folder box: \\192.165.24.175\04_Top_Image
    • Click on connect, answer any credential requests, and it should connect

  • Using command line:
    NET USE  X:  \\192.165.24.175\04_Top_Image
    
JW0914
  • 9,096
10

you could/should map the location properly;

net use DriveLetter: NetworkPath /PERSISTENT:YES

then you can just cd into the directory.

or using the the pushd command is an option;

pushd YourNetworkPath

I believe Powershell will just let you use the cd command though, so if you aren't married to cmd.exe, you could use powershell too.

7

Use pushd \\192.165.24.175\04_Top_Image. It will map the drive and cd into it. When you're done, use popd to unmap and go back to where you were.

Jonathan
  • 3,633