Link to home
Create AccountLog in
Avatar of mchint01
mchint01

asked on

File Move C#.net over different servers

Hi,

I am using File.Move(source, destination) to move a file from one server to other server.
Say from DEV to LOCAL, or QA to DEV etc.

I am getting error: Network path not found:
Could not find a part of the path / The network path was not found / Unable to find the specified file.

I am sure there should be some thing related to PATHS.
How to find LOCAL SYSTEM PATH. For Ex:
My Computer name: xxx.aaainc.com

How to give specified folder path to the above mentioned computer?
ASKER CERTIFIED SOLUTION
Avatar of s_chilkury
s_chilkury
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of ajb2222
ajb2222

I would map a drive to the server.  then use normal drive paths.  

but a network server path is just that.

\\xxx.aaainc.com\share\path

remember that in c# you need to either prefix the string with @ or add aditional \ to the path

@"\\xxx.aaainc.com\share\path"

or

"\\\\xxx.aaainc.com\\share\\path"