473,748 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 13962
You should be able to access the folder as
\\servername\sh arename\foldern ame\newfolder
So do:
Directory.Creat eDirectory(@"\\ servername\shar ename\foldernam e\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.Creat eDirectory(@"\\ hydhtc91670\mpI H\mpIH_deployab les\NewFolder_1 23");

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\sh arename\foldern ame\newfolder
So do:
Directory.Creat eDirectory(@"\\ servername\shar ename\foldernam e\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\m pIH\ is empty
and you want to make mpIH_deployable s 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.Creat eDirectory(@"\\ hydhtc91670\mpI H\mpIH_deployab les\NewFolder_1 23");

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\sh arename\foldern ame\newfolder
So do:
Directory.Creat eDirectory(@"\\ servername\shar ename\foldernam e\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
17872
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 returns the UNC path of that folder. Using ADSI IADsFileShare, I would like to create that share, but the ..Path property seems to reject the UNC. Is there a way of converting that UNC to the logical drive path or some other way of setting the...
2
3657
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 same path on the network drive it says "The process cannot access the file "\\foo\bar.txt" because it is being used by another process. its not until i restart my exe that it can access it. I tried catching the error and closing the file when the...
3
826
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 (or both). -- Lamont - OKC Developer
1
6672
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 computer programmatically. I have the administrator username and password of the remote computer. Can anyone tell me how this can be done? I have tried using ManagementScope but it does not work.
1
2806
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,. permission denied etc. I would be greatful to you if you could help me solving this problm
2
8192
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 possible to access the file with just using the IP address ? Thanks Marcel Hug
3
27054
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 would do so by pinging the machine and seeing if I get a response). I would also like to add the ability to remotely shutdown a computer from the python script. Does anyone have a code snippet for pinging an IP, a code snippet for shutting down a...
4
4222
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 change that the application will be able to run on any other machine (using \\ syntax on the run command- not a problem) using the DB located on a static-different machine. for this purpose I need to create a Remote Connection from my
0
1055
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 start menu run \\remoteComptername\ by giving username and password then only i able to open the photos folder. how to automate this process in windows.
0
8831
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9552
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9376
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8245
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4877
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.