Accessing a Remote C Drive Through Command Prompt
You can access another computer's C drive using Command Prompt if that computer is on your network and file sharing is enabled. The most direct method is the net use command, which maps a network drive to a letter on your own machine — this makes the remote C drive appear as if it were physically attached to your computer. After mapping, you navigate to it like any local drive.
Before you start, you need three things: the remote computer's IP address or hostname, a username and password that work on that computer, and confirmation that file sharing is turned on there. If you don't know the remote computer's address, you can find it by opening Command Prompt on that machine and typing ipconfig, then looking for the IPv4 Address line.
Key Takeaways
- The net use command maps a remote C drive to a letter on your computer, making it accessible like a local drive.
- You need the remote computer's IP address or hostname, plus valid login credentials for that machine.
- File sharing must be enabled on the remote computer before Command Prompt can reach its C drive.
- After mapping succeeds, you can browse the remote drive using dir, cd, and other standard commands.
- Unmapping a drive with net use /delete closes the connection and frees the drive letter.
Finding the Remote Computer's Address
Open Command Prompt on the computer whose C drive you want to access. Press the Windows key, type cmd, and press Enter. Type ipconfig and press Enter. Look for the line labeled IPv4 Address — it will look something like 192.168.1.100. Write this down or take a screenshot.
If the computers are on the same home or office network, you can also use the computer's hostname instead of its IP address. On that remote computer, right-click the Start button, select System, and look for the device name near the top of the window. The hostname is often easier to remember than an IP address, though IP addresses work more reliably across different network setups.
Enabling File Sharing on the Remote Computer
File sharing must be turned on for Command Prompt to reach the remote C drive. On the computer you want to access, open Settings, go to System, then select About. Scroll down and click Advanced sharing settings. Under your current network profile (usually "Private" at home or "Work" at an office), turn on Network discovery and File and printer sharing.
If you see a message about a firewall, click through to allow the changes. Close Settings and restart the computer — this ensures the changes take effect. Without these settings enabled, Command Prompt will not be able to see or connect to the C drive, even with the correct password.
Mapping the Remote Drive with net use
On your own computer, open Command Prompt as Administrator. Press the Windows key, type cmd, right-click Command Prompt, and select Run as administrator. Type the following command, replacing the bracketed sections with your actual information:
net use Z: \\192.168.1.100\c$ /user:COMPUTERNAME\username password
Break this down: Z: is the drive letter you're assigning (you can use any letter that isn't already in use on your computer). \\192.168.1.100 is the remote computer's IP address (or use its hostname instead). \c$ tells Command Prompt to connect to the C drive specifically — the dollar sign is required. /user:COMPUTERNAME\username is the login name on the remote computer, and password is that user's password. If the username has spaces or special characters, put the whole thing in quotes.
Press Enter. If the command succeeds, you'll see "The command completed successfully." If it fails, you'll see an error message — the most common ones are "The network path was not found" (wrong IP address or file sharing is off) or "Access denied" (wrong password or username).
Browsing and Working with the Remote C Drive
Once the drive is mapped, you can navigate to it in Command Prompt by typing Z: (or whatever letter you chose) and pressing Enter. You're now on the remote C drive. Use standard commands like dir to list files and folders, cd foldername to enter a folder, and cd .. to go back one level.
You can copy files to and from the remote drive using the copy command. For example, copy Z:\Users\Documents\file.txt C:\Users\Documents\ copies a file from the remote C drive to your local C drive. You can also use xcopy for copying entire folders with their contents. Any file operation you can do on a local drive, you can do on the mapped remote drive — the connection works the same way.
Keep in mind that your access is limited to what the remote user account can access. If you're logged in as a standard user on the remote computer, you won't be able to see or modify files in protected system folders, even though the C drive is mapped.
Disconnecting and Unmapping the Drive
When you're finished working with the remote C drive, disconnect it to free up the drive letter and close the network connection. In Command Prompt, type net use Z: /delete (replacing Z with the letter you used) and press Enter. You'll see "The command completed successfully."
If you want to disconnect all mapped network drives at once, type net use * /delete and press Enter, then type Y when prompted to confirm. The mapped drive will no longer appear in File Explorer or Command Prompt, and the network connection will close.
Troubleshooting Connection Problems
If you get "The network path was not found," the most likely cause is an incorrect IP address or hostname. Double-check the address on the remote computer by running ipconfig again. Also verify that file sharing is actually enabled — sometimes it turns off after a Windows update. Go back to Advanced sharing settings on the remote computer and confirm both Network discovery and File and printer sharing are on.
If you get "Access denied," the username or password is wrong. Make sure you're using the exact username and password that work when you log into that computer directly. Passwords are case-sensitive in Command Prompt, so check for capital letters. If the remote computer uses a Microsoft account instead of a local account, use the full email address as the username.
If the remote computer is on a different network or behind a router you don't control, the IP address method may not work — you'd need to use a VPN or remote desktop software instead. Command Prompt's net use command works best on local networks where both computers can see each other directly.
Frequently Asked Questions
Can I access a remote C drive if I don't know the password?
No. Command Prompt requires valid login credentials for the remote computer. If you don't have the password, you cannot map the drive. If you own the computer, you can reset the password through Windows Settings or use password recovery tools, but you cannot bypass authentication through Command Prompt.
What if the remote computer is turned off?
The connection will fail when ready. The remote computer must be powered on and connected to the network. If you need to access it regularly, consider enabling Wake-on-LAN in the BIOS, which allows you to power it on remotely — though this requires additional setup beyond Command Prompt.
Can I map a remote drive if the computers are on different networks?
Not directly through Command Prompt. The net use command works only on local networks where both computers can reach each other. For different networks or the internet, you need a VPN connection first, or use remote desktop software like Windows Remote Desktop or TeamViewer instead.
Is it safe to leave a remote drive mapped all the time?
It's generally safe, but it ties up a network connection and the remote computer's resources. If the remote computer restarts or the network drops, the mapped drive may become unavailable and cause errors in any programs trying to use it. It's better to map the drive only when you need it and disconnect when finished.
Can I map a drive on a Mac or Linux computer?
Not with the Windows net use command. That command works only with Windows computers running SMB file sharing. For Mac or Linux, you'd need to use different tools like smbclient on Linux or the Finder's "Connect to Server" feature on Mac, depending on what file sharing protocol the remote computer uses.
