Question about System.IO File/Directory classes

  • Thread starter Thread starter vince
  • Start date Start date
V

vince

MSDN help says you can use a UNC path for any methods
that accept a path, and I'm wondering if I can also
substitute an IP address for the UNC....???

Example:

Using System.IO.File.Move()

File.Move("\\\\MyServer\\share\\dir\\myfile.txt",
"\\\\YourServer\\share\\dir\\myfile.txt");

Should I also be able to use IP address like this?:

File.Move("http:192.168.1.1\\share\\dir\\myfile.txt",
"http:192.166.1.3\\share\\dir\\myfile.txt");

thanks for your input...

vince
 
No. Unfortunately the System.IO classes do not transparently handle http
and other protocols that are supported by System.Net. You will have to
write System.Net code to download the file first.

Obviously it would be very useful for this to "just work", and it is a
commonly requested feature. It has been under consideration for some time,
although it is unfortunately a very difficult task to squash these two
together.

--------------------
Content-Class: urn:content-classes:message
From: "vince" <[email protected]>
Sender: "vince" <[email protected]>
Subject: Question about System.IO File/Directory classes
Date: Thu, 10 Jul 2003 11:41:19 -0700
Lines: 24
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcNHEtoXYKdxIfWQTzu3rFLmLf1vuA==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.dotnet.general
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:100804
NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.general

MSDN help says you can use a UNC path for any methods
that accept a path, and I'm wondering if I can also
substitute an IP address for the UNC....???

Example:

Using System.IO.File.Move()

File.Move("\\\\MyServer\\share\\dir\\myfile.txt",
"\\\\YourServer\\share\\dir\\myfile.txt");

Should I also be able to use IP address like this?:

File.Move("http:192.168.1.1\\share\\dir\\myfile.txt",
"http:192.166.1.3\\share\\dir\\myfile.txt");

thanks for your input...

vince


--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
Back
Top