472,978 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,978 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 13877
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dave | last post by:
I have an application where I am providing the user the ability to select or create a folder on a domain, using SHBrowseForFolder. When the user selects/creates a folder on a remote computer, it...
2
by: Daniel | last post by:
when i use stream writer to write to a shared folder, and the network card of that remote computer is disabled in the middle of the write then reenabled later. every time i try to write to that...
3
by: Lamont | last post by:
VB.NET Can anyone tell me how I can get the Drive Space information from a remote computer on the same domain and physical network? Primarily I need the Total disk space and space used or free...
1
by: Bhavya Shah | last post by:
Hello All, I am facing a serious problem while copying a file to a remote computer programmatically. What I want to do: I want to connect to a remote computer and copy a file to the remote...
1
by: sajithm | last post by:
Hi all, I have a problem while trying to create folder and files in a remot storage server using asp.net. Actually I was trying with filesystem object and this says bad usernam and passeord,....
2
by: schaf | last post by:
Hi Ng ! I'm a little confused because of my application. I need to access a file in the path C:\Temp\test.txt on a computer in the same network. Now I just know the IP address of this PC. Is it...
3
by: joja15 | last post by:
I am working on a Python script to perform as a remote computer manager. So far I have a WOL function working and I would like to add the ability to show if a machine is on or off (I figured I...
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
0
by: snagrao | last post by:
Sir, please help me in Visualbasic 6 . my requirement is , i stored photos at remote computer and write code in VB forms to access it. if computer at remote is connected to clint by goinmg from...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.