File sharing over a network in Windows

Si applica a
Windows 10 Windows 11

This article focuses on sharing files or folders over a Local Area Network (LAN), such as between computers connected on the same home or workplace network. To share files over the Internet—for example, with friends or family—use OneDrive. For details, see Share OneDrive files and folders.


Here are some answers to common questions about changes to file and folder sharing in Windows 11:

How do I share folders over a network?

To share a folder over a network in File Explorer, do the following:

  1. Right-click (or long-press) a file, and then select Show more options.

  2. Select Give access to and choose Specific people.

    Sharing a file with specific people on a network

  3. Select a user on the network to share the file with or select Everyone to give all network users access to the file.

How do I map a network drive?

Map a network drive to get to it from File Explorer in Windows without having to look for it or type its network address each time.

  1. Open File Explorer from the taskbar or the Start WindowsLogo menu, or press the Windows logo key WindowsLogo + E.

  2. Select This PC from the left pane. Then, on the File Explorer ribbon, select More More  and choose Map network drive.

    Where to find Map Network Drive in Windows 11 File Explorer

    Note

    If you don't see Map network drive on the More menu, you can right-click the This PC node in the folder pane and you'll see the command there.

  3. In the Drive list, select a drive letter. (Any available letter will do.)

  4. In the Folder box, type the path of the folder or computer, or select Browse to find the folder or computer. To connect every time you sign in to your PC, select Reconnect at sign-in.

  5. Select Finish.

Note: If you can't connect to a network drive or folder, the computer you're trying to connect to might be turned off, or you might not have the correct permissions. Try contacting your network administrator.

How do I stop sharing folders?

  1. Right-click or press a folder, then select Show more options
  2. Select Give access to and choose Remove access.

Screenshot of Windows 11 Remove mapped drive access.

Why does "Stop sharing" or "Remove access" show in File Explorer for folders I haven't shared?

File Explorer shows the Remove access option for all folders, even those that aren't being shared over a network.

How do I tell which folders I've shared over a network?

Open File Explorer, then type \\localhost into the address bar.

Note

When you've shared a folder in your user profile and you go to \\localhost, you'll see your user profile and all its files there. This doesn't mean that all of your files are shared—just that you have access to all your own files.

How do I turn on network discovery?

If you open File Explorer, go to Network, and see an error message ("Network discovery is turned off…."), you'll need to turn on network discovery to see devices on the network that are sharing files. To turn it on, select the Network discovery is turned off banner, then select Turn on network discovery and file sharing.

The Network and File Sharing prompt in the Network pane in Windows 11.

How do I troubleshoot sharing files and folders?

To troubleshoot problems with sharing files or folders, follow the steps below on all computers from which you're trying to share.

  • Update Windows. Ensuring all machines are as updated as they can be is key to making sure you aren't missing out on any driver or Windows updates. 

  • Make sure the computers are on the same network. For example, if your computers connect to the internet through a wireless router, make sure they all connect through the same wireless router.

  • If you're on a Wi-Fi network, set it to Private. To find out how, see Essential network settings and tasks.

  • Turn on network discovery and file and printer sharing and turn off password protected sharing.

    1. Select the Start WindowsLogo  button, then choose Settings SettingsApp .
    2. In the Find a setting search bar, type manage advanced sharing settings and select Manage advanced sharing settings from the suggested results.
    3. In the Advanced sharing settings window that appears, under Private networks, turn on Network discovery and File and printer sharing.
    4. Under All Networks, turn off password protected sharing.
  • Make sharing services start automatically.

    1. Press the Windows logo key WindowsLogo  + R.

    2. In the Run dialog box, type services.msc, and then select OK.

    3. Right-click each of the following services, select Properties, if they're not running, select Start, and next to Startup type, select Automatic:

      • Function Discovery Provider Host
      • Function Discovery Resource Publication
      • SSDP Discovery
      • UPnP Device Host