473,405 Members | 2,279 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

System.IO Copy() and Move() question

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
2 7385
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Spyros | last post by:
I want to move a MySQL Database 3.23.54-max-nt from a Windows 2000 Server to a 4.0.14-max on a Redhat Linux Server. Any idea will be welcome. Thanks Spyros
4
by: Ben Reese | last post by:
I need to copy (not move) a directory and all of its contents to another Location Disk / Server / Universe etc. But I cannot find a Copy method on the Directory or DirectoryInfo objects only a...
3
by: Daniel | last post by:
Is it possible to retain local file system read, write, delete access while impersonating for access to a remote drive in a different domain? I need to be able to move files from a local computer...
4
by: Steffen Loringer | last post by:
Hi all, which of the asp.net files on my development system must be transfered to the "final" server system to make the application working? And which of the "Directory" option in IIS need to be...
0
by: Javier | last post by:
I found this in a news group and decided to try it. A little while back, I was browsing through news groups, just like you are now and came across a message just like this, that said you could...
4
by: JIM.H. | last post by:
Hello, I am trying to write the data I got from a web service to my table in SQL Server I need to append the dataset wsDS to the dataset ds and do update. PVS.myWS.Loader load = new...
12
by: mantrid | last post by:
Im trying to move a file but am having luck my code is below. The temp and target paths are valid as they echo correctly. but I cant get the copy() function to work, or the rename() function ...
13
by: Avi | last post by:
Hi, Is there a UNIX C system command that will let me copy a file? I am looking for something similar to "cp" that can be called within a C program. I know of the "link" system call but this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.