473,378 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to create a folder?

ad
I want to create a folder with CSharp
But the codes I found are for vb.net:
How can I rewrite to C#?
----------------------------------------------------------------------------
------------------------------------------------------

dim objfso=server.createobject("scripting.filesystemob ject")
if not objfso.folderexists("c:\test") then
objfso.createfolder(ConfigurationSettings.AppSetti ngs("RealUserhomePath") &
"\" & gpname)
end if
Nov 16 '05 #1
3 8906
ad <ad@wfes.tcc.edu.tw> wrote:
I want to create a folder with CSharp
But the codes I found are for vb.net:
How can I rewrite to C#?
----------------------------------------------------------------------------
------------------------------------------------------

dim objfso=server.createobject("scripting.filesystemob ject")
if not objfso.folderexists("c:\test") then
objfso.createfolder(ConfigurationSettings.AppSetti ngs("RealUserhomePath") &
"\" & gpname)
end if


That's going a pretty indirect route. I'd suggest using
Directory.CreateDirectory.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
Hello ad,

You ought to learn more about .NET Framework. All the file manipulation related
classes are under System.IO namespace.

I want to create a folder with CSharp
But the codes I found are for vb.net:
How can I rewrite to C#?
----------------------------------------------------------------------
------
------------------------------------------------------
dim objfso=server.createobject("scripting.filesystemob ject")
if not objfso.folderexists("c:\test") then
objfso.createfolder(ConfigurationSettings.AppSetti ngs("RealUserhomePat
h") &
"\" & gpname)
end if

Nov 16 '05 #3
ad
Thank,
I have read the help articles about System.IO namespace. There are many
classes can deal with foldesr
..
After creating a directory, I want to set the right to some user groups or
users, How can I do?

"Hayato Iriumi" <hi*****@hotmail.com>
???????:21*********************@news.microsoft.com ...
Hello ad,

You ought to learn more about .NET Framework. All the file manipulation related classes are under System.IO namespace.

I want to create a folder with CSharp
But the codes I found are for vb.net:
How can I rewrite to C#?
----------------------------------------------------------------------
------
------------------------------------------------------
dim objfso=server.createobject("scripting.filesystemob ject")
if not objfso.folderexists("c:\test") then
objfso.createfolder(ConfigurationSettings.AppSetti ngs("RealUserhomePat
h") &
"\" & gpname)
end if


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: David Webb | last post by:
The problem started when the Working Folder for a project was somehow set to the folder of another project. I set the correct working folder in VSS and deleted the .vbproj files that had been...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
6
by: jzdeng | last post by:
Hi, All I use VS 2005 to create a web service. The web service is used to create a sheared folder. It works fine we I run it from VS 2005. But, when I move it to inetpub, it does not work...
8
by: Paw | last post by:
Greetings. I use asp. what I need is is when a visitor comes to the site, I need it to check the host name. if "www.hometowndigest.com" is the host, then check a folder named "something" and if...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
0
by: 1333 | last post by:
I need to create a new folder every time the upload folder has 10 files uploaded to it. So when folder1 has 10 files, folder2 is created and becomes the upload folder, and when it has 10 files...
7
by: Wiebe Tijsma | last post by:
Hi, I'm using C# + webDAV to create a draft message to be sent in a user's Drafts folder. I can create the message successfully, however when I open the message in outlook, it doesn't show...
10
by: kai | last post by:
Hi, All I am trying to create a file folder for any login user, and create sub folders for the user on a web page. After the user login again, he can only sees his own folder on the Web page. I am...
4
by: Alan Mailer | last post by:
Again, I'm new to VB.net and there is something I need help with: Like (I assume) many of us, over time I want to be able to create some VB.net classes that I might want to use in more than one...
5
by: krasman | last post by:
hi everyone, i hope you might help me on this one. i need to create a contact in a exchange public folder using dotnet (vb or c#) and exchange 2003, without using outlook object model. i'm...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.