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
6
votes
1 answer

How to copy file from UNC-share to local system?

I'm stuck with this question. I have UNC share, I know account details, which has fullaccess, but it doesn't have access to my local system. I can get access to remote UNC with : var token = default(IntPtr); var context =…
Degot
  • 139
  • 4
  • 8
6
votes
5 answers

Windows Service cannot access network location (UNC) Path

I have a windows service that polls a folder continuously for new files.For local directories this works fine.But when it comes to UNC Paths on another system in the same network,the service cannot access the folder it seems.I have refereed to this…
techno
  • 6,100
  • 16
  • 86
  • 192
6
votes
1 answer

Call subprocess.Popen() when the working directory is on a UNC path, not a mapped drive

I would like to run an executable that performs some processing on a dataset located on a remote filer. As part of the design, I'd like the location of the filer to be flexible and something that's passed to my python program at runtime. I've put…
Ian C.
  • 3,783
  • 2
  • 24
  • 33
6
votes
1 answer

java nio iterate files in symbolic link

I would like to iterate over files that are in network UNC path so that I can operate over them, is it possible? I'm trying in below way(see the below code) and it's not listing the files. But, with windows explorer I can access that folder and I…
Emrah Mehmedov
  • 1,492
  • 13
  • 28
6
votes
1 answer

Copy file to Sharepoint-share fails unless user connects to Sharepoint server for the first time

I have a strange behaviour when I try to use a C# program to copy local files to a Sharepoint Server using UNC paths provided by Sharepoint to access the file system. First of all, my user has all the privileges required to access that specific…
Erik
  • 2,316
  • 9
  • 36
  • 58
6
votes
2 answers

Command to delete files in UNC path

Hi I tried below command to delete files in UNC path set folder="\\SERVERNAME\Publish" cd /d %folder% for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q) But I got error saying: UNC paths are not supported. Defaulting to…
Gowtham
  • 252
  • 1
  • 6
  • 22
6
votes
6 answers

File.Move not working properly for UNC paths

I'm attempting to use File.Move to move a file from one UNC location to another. This blows up if the UNC path for the destination happens to be the local machine (error: Access to the path is denied). Example…
Addi
  • 291
  • 1
  • 6
  • 13
6
votes
1 answer

Give FullTrust to UNC share for Visual Studio 2012 and .Net 4.0

Everytime I try to open a solution that is located on a UNC share I get this dialog: I've tried using the caspol.exe utility that Hanselman talks about here, but it doesn't seem to work. At least not for a .Net 4 project runing in Visual Studio…
Micah
  • 111,873
  • 86
  • 233
  • 325
5
votes
7 answers

Visual Basic 6 and UNC Paths

I'm receiving feedback from a developer that "The only way visual basic (6) can deal with a UNC path is to map it to a drive." Is this accurate? And, if so, what's the underlying issue and are there any alternatives other than a mapped drive?
5
votes
2 answers

File.getFreeSpace() Not returning correct value

I use file.GetFreeSpace() from Java's File class in my application to make sure that there is enough room before transferring files. The path is a unc path that currently has ~5TB of free space on it. However when the above code is ran, the amount…
Saggio
  • 2,212
  • 6
  • 33
  • 50
5
votes
1 answer

How to find out the name of the common documents folder on a network machine

Given that I am executing an EXE file (D2006 app) on a machine across the network, how can I get the pathname to the commondocs folder on that machine, given that the EXE might have been invoked from a UNC shortcut or a mapped drive letter shortcut,…
rossmcm
  • 5,493
  • 10
  • 55
  • 118
5
votes
4 answers

html Image source from UNC path

I need to set an image source to a location on the network. The image is located at machineName\mappedPath\abc.jpg. It does not load in any browser though all I need it to work in is IE v9 and above. When I inspect the location in the source it is…
user48408
  • 3,234
  • 11
  • 39
  • 59
5
votes
3 answers

How do I address a UNC path in Ruby on Windows?

I'm trying to access a UNC share via irb on Windows. In the Windows shell it would be \\server\share I tried escaping all of the backslashes. irb(main):016:0> Dir.entries '\\\\server\share' Errno::ENOENT: No such file or directory -…
Sven
  • 53
  • 1
  • 3
5
votes
0 answers

Best way for web application in IIS to access remote fileshare that requires credentials?

I have a web application, hosted on Windows Server 2008 R2 IIS 7.5 that needs to access a remote directory fileshare on a different Windows machine. My website runs under User1, and access to the remote file share via UNC path requires…
Raymond
  • 3,382
  • 5
  • 43
  • 67