windows 本地计算机上文件夹的 UNC 路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2787203/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 07:18:19  来源:igfitidea点击:

UNC path to a folder on my local computer

windowsnetworking

提问by xt_20

What's the UNC path to a folder on my local computer, and how can I access it? I have tried:

本地计算机上某个文件夹的 UNC 路径是什么,我如何访问它?我试过了:

  1. Security for the folder -- set to Everyone Full Control (for now!)
  2. Sharing permissions -- set to Everyone Full Control (for now!)
  1. 文件夹的安全性——设置为每个人完全控制(现在!)
  2. 共享权限——设置为每个人完全控制(现在!)

I can see the folder in \, but can't go in ( is not accessible.)

我可以看到\中的文件夹,但无法进入(无法访问。)

Error message:

错误信息:

You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access pernmissions. The network location cannot be reached. For information about network troubleshooting, see Windows Help.

您可能无权使用此网络资源。请联系此服务器的管理员以了解您是否具有访问权限。无法访问网络位置。有关网络故障排除的信息,请参阅 Windows 帮助。

My computer is not connected to a network.

我的电脑没有连接到网络。

采纳答案by xt_20

I had to:

我不得不:

回答by William Leara

If you're going to access your local computer (or any computer) using UNC, you'll need to setup a share. If you haven't already setup a share, you could use the default administrative shares. Example:

如果要使用 UNC 访问本地计算机(或任何计算机),则需要设置共享。如果您尚未设置共享,则可以使用默认管理共享。例子:

\\localhost\c$\my_dir

\\本地主机\c$\my_dir

... accesses a folder called "my_dir" via UNC on your C: drive. By default all the hard drives on your machine are shared with hidden shares like c$, d$, etc.

... 通过 C: 驱动器上的 UNC 访问名为“my_dir”的文件夹。默认情况下,您机器上的所有硬盘驱动器都与 c$、d$ 等隐藏共享共享。

回答by Jerzy

On Windows, you can also use the Win32 File Namespace prefixed with \\?\to refer to your local directories:

在 Windows 上,您还可以使用带有前缀的 Win32 文件命名空间\\?\来引用您的本地目录:

\?\C:\my_dir

See this answer for description.

有关说明,请参阅此答案。