Questions tagged [unc]

A UNC path unambiguously specifies the location of a volume, directory, file or other local or remote resource on Windows.

On Windows, a UNC path specifies the location of a local or remote resource, including files, directories, volumes and more. UNC path generalize traditional file paths. A UNC path has the form \\Hostname\Folder\Resource. A UNCW path (long UNC) has the form \\?\UNC\Hostname\Folder\Resource.

593 questions
2
votes
1 answer

Problem with WNetGetUniversalName

I have a strange problem with some code that calls WNetGetUniversalName. When I call the function I always get error 67 (ERROR_BAD_NET_NAME). But the network connection really does exist. So from the scratch. I'm writing a Windows shell extension…
Simon Linder
  • 21
  • 1
  • 2
2
votes
3 answers

Get-ChildItem not working with long UNC path

I try to use long UNC paths with Get-ChildItem in Powershell like Get-ChildItem -Path "\\?\c:\blabla" and Powershell says that there are illegal characters in the path. The very same path works with Resolve-Path. How can I use the "\\?\" syntax…
Christoph
  • 1,964
  • 2
  • 27
  • 44
2
votes
0 answers

How can I stop System.Uri from converting UNC paths to File:/// paths?

I am trying to set a WPF image control's source to a UNC path image. My current code goes similar to the following Button.Content = new Image { Source = new BitmapImage(new Uri(UncPathAsString)), VerticalAlignment =…
2
votes
3 answers

Directory Not Found exception when deployed to server

The goal I have is simple: From a web app, write to a folder on the D drive of a local server. When I run the code locally (in the debugger) it writes to the folder beautifully. When I publish the code to the web server it cannot see its own D…
DJGray
  • 504
  • 8
  • 26
2
votes
2 answers

Writing to Windows 7 library with Java application

In the company, we've got several global Java applications used by our employees. Some of them allow the users to create reports, which are always saved in their home directory. The home directories are network drives and are assigned the drive…
user42179
  • 431
  • 4
  • 11
2
votes
2 answers

VB.NET code to Convert shared local path to UNC path

We have windows 2003 server Pc named pc2 in which local drives are shared with different names. For example local drive E is shared with name 'datapath' so that all users in network access that drive using network path '\\pc2\datapath\'. We need…
IT researcher
  • 3,274
  • 17
  • 79
  • 143
2
votes
3 answers

Copy files across UNC

I have a server A which hosts an app to write files to it's hard drive. I have 2 other server B and C. B and C can be accessed by UNC shares on A. I want any files written to hard-drive on A be copied over under similar directory structure to…
Gabbar
  • 4,006
  • 7
  • 41
  • 78
2
votes
3 answers

Connecting a mapped drive letter in Windows service

I'm writing a Windows service (Delphi XE2) that calls functions in a 3rd party COM library. The core of the COM library is quite old and requires that a drive letter is mapped to the location of its data files. It absolutely does not work with UNC…
Jonathan Wareham
  • 3,357
  • 7
  • 46
  • 82
2
votes
1 answer

Enumerate through network connected paths in C#

I have several paths that I'm connected to through net use, but they are not listed on my system as a network drive since I'm connected to the using the following net use command: net use \\{server}\{environment} that is, I'm not listing them as an…
ocp1000
  • 571
  • 1
  • 5
  • 12
2
votes
1 answer

PHP exec on windows - php cwd is a Windows Network Share

this is my first post and I would like to apologise in advance in case it's not worded or structured in the best way. I am using Windows7 Home Premium with IIS 7.5 and PHP 5.3 I am executing the following code in php and it doesn't work. The exec…
tommizi
  • 21
  • 2
2
votes
1 answer

Authentication issues using simulated host via UNC

After modifying my "hosts" file I have appended the location for "testunc" to "127.0.0.1". When I type in the path "\testunc\share" into "Run" (I have a shared folder on my C:\ drive called "share") I receive an authentication prompt. I am asked for…
Shrout1
  • 2,497
  • 4
  • 42
  • 65
2
votes
1 answer

Why can't Powershell Copy-Item -Source -Destination to a UNC path known as a Variable see below

#VARIABLES $Source = Read-host "Please provide DIR location you wish to copy its contents from. ie. (UNC, Absolute paths, etc)" $Serverlist = Read-Host "Please provide the location of the server list. (UNC, Absolute paths, etc)" $Servers =…
2
votes
2 answers

How to Get the amount of disk space available of a UNC path(WITH WHITESPACES) in Java

I am trying to use org.apache.commons.io.FileSystemUtils.freeSpaceKb(String path) in Java to get the free space of a UNC path that has white spaces. The problem is that this function does not work properly when there are white spaces. Say there is a…
2
votes
2 answers

Accessing Files On Server By Specifying Credentials

Our company has a share point document server where the UNC looks something like this: \\theserver.ourdomain.com\rootdirectory Currently this drive is mapped to the Z:\ on my local computer. To access the Z:\ you have to specify (each time you…
test
  • 2,589
  • 2
  • 24
  • 52
2
votes
3 answers

On Windows, can you use UNC like paths to files in PHP, for functions like file_get_contents(), etc?

(Assuming the network folders/permissions are correctly set up and working in Windows, and a 'default' PHP setup...) Is it possible to use UNC network paths [like \\ServerName\Folder\file.txt] in PHP's functions like file_get_contents(), fopen(),…
anonymous coward
  • 12,594
  • 13
  • 55
  • 97