-
Check for UNC Path and non-UNC Path Pointing to the Same Folder
I need to determine if a UNC [universal naming convention] path points to
the same place as non-UNC path, for example:
\\Dell7500\c\MyFolder and
c:\MyFolder
point to the same folder. 'Dell7500' is the name of the local computer.
In my application I copy files from one folder to the other folder if the
paths are different. In the above example the names are different but they
both point to the same folder. So when I attempt to copy I get an access
error [as I should] because I am attempting to copy the same file onto
itself. And I don't need to copy the file at all.
Is there an API that will compare a UNC with a non-UNC and report they are
both pointing to the same folder? In other words, let me know they both
point to the same place.
Thanks and Cheers,
Larry Rebich
larry@buygold.net
www.buygold.net
-
Re: Check for UNC Path and non-UNC Path Pointing to the Same Folder
Hi Larry --
See UncName.zip on my site for examples of how to call NetEnumShare on both NT and
9x. That oughta be the first step in your finding your solution.
Later... Karl
--
http://www.mvps.org/vb
"Larry Rebich" <lrebich@earthlink.net> wrote in message
news:393dcef5@news.devx.com...
> I need to determine if a UNC [universal naming convention] path points to
> the same place as non-UNC path, for example:
>
> \\Dell7500\c\MyFolder and
> c:\MyFolder
>
> point to the same folder. 'Dell7500' is the name of the local computer.
>
> In my application I copy files from one folder to the other folder if the
> paths are different. In the above example the names are different but they
> both point to the same folder. So when I attempt to copy I get an access
> error [as I should] because I am attempting to copy the same file onto
> itself. And I don't need to copy the file at all.
>
> Is there an API that will compare a UNC with a non-UNC and report they are
> both pointing to the same folder? In other words, let me know they both
> point to the same place.
>
> Thanks and Cheers,
> Larry Rebich
>
> larry@buygold.net
> www.buygold.net
>
>
>
>
-
Re: Check for UNC Path and non-UNC Path Pointing to the Same Folder
Hi Larry --
See UncName.zip on my site for examples of how to call NetEnumShare on both NT and
9x. That oughta be the first step in your finding your solution.
Later... Karl
--
http://www.mvps.org/vb
"Larry Rebich" <lrebich@earthlink.net> wrote in message
news:393dcef5@news.devx.com...
> I need to determine if a UNC [universal naming convention] path points to
> the same place as non-UNC path, for example:
>
> \\Dell7500\c\MyFolder and
> c:\MyFolder
>
> point to the same folder. 'Dell7500' is the name of the local computer.
>
> In my application I copy files from one folder to the other folder if the
> paths are different. In the above example the names are different but they
> both point to the same folder. So when I attempt to copy I get an access
> error [as I should] because I am attempting to copy the same file onto
> itself. And I don't need to copy the file at all.
>
> Is there an API that will compare a UNC with a non-UNC and report they are
> both pointing to the same folder? In other words, let me know they both
> point to the same place.
>
> Thanks and Cheers,
> Larry Rebich
>
> larry@buygold.net
> www.buygold.net
>
>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks