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
-
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
On the network you shouldn't have to include the "http://" portion, but you can use the IP address of the server, usually. -Nick Parker
-
On the network you shouldn't have to include the "http://" portion, but you can use the IP address of the server, usually. -Nick Parker
-
thanks for the reply.... so I could do something like: "\\\\192.168.1.1\\myshare\\dir\file.txt" ??? thanks for your input..
vlusardi wrote: "\\\\192.168.1.1\\myshare\\dir\file.txt" ??? Yes, but you would only use two backwards slashes before the I.P. Address. -Nick Parker
-
vlusardi wrote: "\\\\192.168.1.1\\myshare\\dir\file.txt" ??? Yes, but you would only use two backwards slashes before the I.P. Address. -Nick Parker
-
vlusardi wrote: "\\\\192.168.1.1\\myshare\\dir\file.txt" ??? Yes, but you would only use two backwards slashes before the I.P. Address. -Nick Parker
Ummm... if this is c++ or c# (non-literal string so things need to be escaped) you would need the double slashes, hence four slashes at the beginning... Sorry, I being nit-picky.... -Nathan --------------------------- Hmmm... what's a signature?
-
Ummm... if this is c++ or c# (non-literal string so things need to be escaped) you would need the double slashes, hence four slashes at the beginning... Sorry, I being nit-picky.... -Nathan --------------------------- Hmmm... what's a signature?
Well, with C# you could use a verbatim string with an
@
in front of it and you would only need two backwards slashes. ;) -Nick Parker