By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,670 Members | 1,330 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,670 IT Pros & Developers. It's quick & easy.

System.IO Copy() and Move() question

P: n/a
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

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello Vince,

No, you cannot use http://192.168.1.1 as a valid UNC path. But, if using
Win2K/XP, then you should be able to use \\192.168.1.1\share_name as a valid
UNC path. If you are looking to use http://192.168.1.1, then you should look
into using WebDAV.

HTH,

Bill P.

"vince" <vl******@sdcera.org> wrote in message
news:01****************************@phx.gbl...
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

Nov 13 '05 #2

P: n/a
Glad to have been of help :)

Bill P.

"vince" <vl******@sdcera.org> wrote in message
news:02****************************@phx.gbl...
Bill,

thanks for the reply.... any IP format that I can use in
the UNC will work, and this will be with XP, so I guess
my question should have been "how can I substitute an IP
address in a UNC ???"....

thanks a heap...

-----Original Message-----
Hello Vince,

No, you cannot use http://192.168.1.1 as a valid UNC

path. But, if using
Win2K/XP, then you should be able to use \\192.168.1.1

\share_name as a valid
UNC path. If you are looking to use http://192.168.1.1,

then you should look
into using WebDAV.

HTH,

Bill P.

"vince" <vl******@sdcera.org> wrote in message
news:01****************************@phx.gbl...
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

.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.