471,339 Members | 1,242 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to create a folder in a remote computer in c#

Hi,

i want to create a folder in remote computer in c# without using WMI.

any help?

thanks.
Jul 24 '08 #1
3 13709
You should be able to access the folder as
\\servername\sharename\foldername\newfolder
So do:
Directory.CreateDirectory(@"\\servername\sharename \foldername\newfolder");

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Omar" wrote:
Hi,

i want to create a folder in remote computer in c# without using WMI.

any help?

thanks.
Jul 25 '08 #2
Hi Ciaran,

I have a similar reqwuirement so i tried your solution below for creating
the directory but couldn't.

I have added myself under administrator group of hydhtc91670 m/c and have
wriiten the following code to create NewFolder_123 on that m/c.

Directory.CreateDirectory(@"\\hydhtc91670\mpIH\mpI H_deployables\NewFolder_123");

I am getting following error
"The network path was not found".

Does the issue lie with permission i need on that particular m/c. If so what
extra permissions i need to have on that m/c.

Rgrds,
Earla
"Ciaran O''Donnell" wrote:
You should be able to access the folder as
\\servername\sharename\foldername\newfolder
So do:
Directory.CreateDirectory(@"\\servername\sharename \foldername\newfolder");

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Omar" wrote:
Hi,

i want to create a folder in remote computer in c# without using WMI.

any help?

thanks.
Aug 6 '08 #3
You might have to check that the rest of the path Exists. If you want to
create more than one level of directories, i.e. \\hydhtc91670\mpIH\ is empty
and you want to make mpIH_deployables then make NewFolder_123 inside it, you
would need to create them in turn.
If this isnt the case, check the permissions on the share to ensure remote
users have access to modify and create folders.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Pradeep Earla" wrote:
Hi Ciaran,

I have a similar reqwuirement so i tried your solution below for creating
the directory but couldn't.

I have added myself under administrator group of hydhtc91670 m/c and have
wriiten the following code to create NewFolder_123 on that m/c.

Directory.CreateDirectory(@"\\hydhtc91670\mpIH\mpI H_deployables\NewFolder_123");

I am getting following error
"The network path was not found".

Does the issue lie with permission i need on that particular m/c. If so what
extra permissions i need to have on that m/c.

Rgrds,
Earla
"Ciaran O''Donnell" wrote:
You should be able to access the folder as
\\servername\sharename\foldername\newfolder
So do:
Directory.CreateDirectory(@"\\servername\sharename \foldername\newfolder");

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Omar" wrote:
Hi,
>
i want to create a folder in remote computer in c# without using WMI.
>
any help?
>
thanks.
Aug 7 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Lamont | last post: by
1 post views Thread by Bhavya Shah | last post: by
1 post views Thread by sajithm | last post: by
3 posts views Thread by joja15 | last post: by
reply views Thread by rosydwin | last post: by

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.