How to Access a Network Location in Command Prompt on Windows 10

Use pushd with the full UNC path to enter a network share in Windows 10 Command Prompt, for example, pushd "\\FILESERVER\Team Share\Reports". The cd command cannot set a UNC path as the CMD current directory, so it returns “CMD does not support UNC paths as current directories.” pushd temporarily maps the share to an available drive letter and changes into the folder. Run popd afterward to return to where you started. Replace this fictional server path with one you can access.

The interface examples below use a fictional share path and sample filenames.

1. Find the complete UNC path

A UNC path starts with two backslashes and follows the pattern \\server\share\folder. In \\FILESERVER\Team Share\Reports, FILESERVER is the server, Team Share is the share, and Reports is a subfolder. Windows documents this server-and-share path format.

Open the folder in File Explorer and check its address bar. If Explorer shows a mapped drive such as Z:\Reports, run net use in Command Prompt to list network connections and find its remote UNC path.

File Explorer showing an example UNC path in the address bar and two files in a shared Reports folder
Example only: the address bar shows a server, share, and subfolder.

2. Open Command Prompt

Open Start, type cmd, and select Command Prompt. For routine file commands, use a standard prompt under the same account as File Explorer. An elevated prompt may not see the same mapped drives.

Windows 10 Start search for cmd with Command Prompt shown as the Best match
Select the standard Command Prompt app.

3. Why cd does not work with a UNC path

Typing cd "\\FILESERVER\Team Share\Reports" does not move CMD into the share. Instead, it displays the UNC-path error and leaves the prompt at its previous location. Quotes handle spaces, but they do not overcome this limitation.

Command Prompt showing cd with a UNC network path and the message that CMD does not support UNC paths as current directories
The error is expected when cd is pointed directly at a UNC path.

4. Enter the share with pushd

At the prompt, type this command and press Enter:

pushd "\\FILESERVER\Team Share\Reports"

Keep both leading backslashes and quote the full path when it contains spaces. With command extensions enabled, pushd accepts a network path and temporarily assigns the highest unused drive letter, starting with Z:. It then moves into the requested folder. If Z: is occupied, CMD uses another available letter; the assigned letter is not fixed.

Command Prompt showing pushd with the example UNC path and the resulting Z colon backslash Reports prompt
The example uses a temporary Z: drive and opens the Reports subfolder.

5. Confirm the current folder

Type cd by itself to display the current directory. Run dir to list folder contents or dir /b for a compact list of names. This confirms the prompt is on the share before you continue.

Command Prompt showing dir slash b listing Q1.xlsx and Notes.txt from Z colon backslash Reports
A brief directory listing confirms that CMD can read the share.

6. Run a command in the network folder

Commands now work from the network folder as they do from a local directory. For example, dir /b *.xlsx lists spreadsheet files, and type "Notes.txt" displays a plain-text file. Replace these example names with real ones and quote any filename containing spaces. pushd changes the working location; it does not grant permission to read or modify files.

Command Prompt at Z colon backslash Reports showing cd output and dir slash b star dot xlsx returning Q1.xlsx
Use a pattern such as *.xlsx to list matching files.

7. Return to the original location

When finished, run popd. It returns CMD to the location saved by the most recent pushd. With command extensions enabled, it also removes the temporary drive-letter assignment. If you used pushd multiple times, run popd once for each saved location, in reverse order.

Command Prompt showing popd returning from Z colon backslash Reports to C colon backslash Users backslash Alex
The prompt returns to the directory that was active before pushd.

8. Troubleshoot access errors

  • Network path not found: check the server, share, and folder spelling, connect to the correct network or VPN, and confirm the UNC path opens in File Explorer.
  • Access is denied: use an account with permission to the share and its files. Share and file-system permissions can both apply; ask the owner or administrator to check them.
  • A mapped drive is missing in an administrator prompt: try a standard Command Prompt under the same account as Explorer. Windows can keep mappings in separate logon sessions, so an elevated prompt may not see a mapping from the standard session.
  • pushd will not accept a network path: command extensions may be disabled. Start a command session with cmd /e:on to enable them, then retry.
Command Prompt showing the example pushd command followed by an Access is denied message
This example shows a permissions error; confirm that your account can use the share.

Microsoft references

Leave a Comment

How to Access a Network Location in Command Prompt on Windows 10

How to Access a Network Location in Command Prompt on Windows 10

Use pushd to open a UNC network path in Windows 10 Command Prompt, run commands in the shared folder, and return with popd.

How to Install a Rainmeter Skin From an INI File on Windows 10

How to Install a Rainmeter Skin From an INI File on Windows 10

Learn how to install a Rainmeter skin from an INI file by placing it in the right Skins folder, preserving its resources, refreshing Rainmeter, and loading it in Manage.

How to Open Folders in a New File Explorer Window on Windows 10

How to Open Folders in a New File Explorer Window on Windows 10

Open one folder in its own File Explorer window with Shift or the context menu, or change Folder Options to make every folder open separately.

How to Pin a Control Panel Setting to the Start Menu in Windows 10

How to Pin a Control Panel Setting to the Start Menu in Windows 10

Pin a frequently used Control Panel applet, such as Power Options or Sound, to the Windows 10 Start menu for one-click access.

How to Set a Custom Keyboard Shortcut for Language Switching in Windows 10

How to Set a Custom Keyboard Shortcut for Language Switching in Windows 10

Choose a supported Windows 10 hotkey for switching input languages, assign shortcuts to individual layouts, or disable an accidental shortcut.

How to Run an App on a Specific Monitor in Windows 10

How to Run an App on a Specific Monitor in Windows 10

Move a Windows 10 app to the display you want, use its game monitor setting, and handle full-screen apps with a practical primary-monitor workaround.

How to Add an Image Watermark to Your Windows 10 Screen

How to Add an Image Watermark to Your Windows 10 Screen

Use a transparent PNG and a Rainmeter skin to keep an image watermark above windows, adjust its transparency, and make it click-through on Windows 10.

How to Convert Stereo Audio to Mono on Windows 10

How to Convert Stereo Audio to Mono on Windows 10

Convert stereo audio to mono on Windows 10 with Audacity. Mix both channels into one mono track, export a new file, and verify the channel count.

How to Copy Multiple Items to the Clipboard in Windows 10

How to Copy Multiple Items to the Clipboard in Windows 10

Use Windows 10 Clipboard history to save recent text and images, paste an earlier clip with Windows key + V, and manage sync, pinned items, and privacy.

How to Zoom In on a Video While It’s Playing in Windows 10

How to Zoom In on a Video While It’s Playing in Windows 10

Learn how to zoom in on a video in Windows 10 with VLC’s Interactive Zoom, or use Windows Magnifier when the clip is playing in another app.