473,396 Members | 1,812 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,396 software developers and data experts.

create a folder on button click

2
hi,
Can any of you can give a code snippet as my solution.
I want to create a form in windows application , and on clicking a button , I shoud create a folder in a specified location.
Thanks in advance
help help help......
mahlog
Aug 3 '07 #1
5 1645
Floydan
24
hi,
Can any of you can give a code snippet as my solution.
I want to create a form in windows application , and on clicking a button , I shoud create a folder in a specified location.
Thanks in advance
help help help......
mahlog
Hi,

if you just want to create a folder at a given location this should be sufficient:

Expand|Select|Wrap|Line Numbers
  1. System.IO.DirectoryInfo dirInfo = new System.IO.DirectoryInfo("path");
  2. dirInfo.Create();
  3.  
Aug 3 '07 #2
mahlog
2
Hi,

if you just want to create a folder at a given location this should be sufficient:

Expand|Select|Wrap|Line Numbers
  1. System.IO.DirectoryInfo dirInfo = new System.IO.DirectoryInfo("path");
  2. dirInfo.Create();
  3.  
But is it a console application in C# ?
what I want is a windows application , and creation of folder should occur as a button click event...
regards
Mahlog
Aug 6 '07 #3
radcaesar
759 Expert 512MB
What ever application it may be, It is the Library for file system processing.

System.IO.DirectoryInfo dirInfo = new System.IO.DirectoryInfo("path");
dirInfo.Create();
Aug 6 '07 #4
Plater
7,872 Expert 4TB
Directory.Create("path"); does same thing
Aug 6 '07 #5
TRScheel
638 Expert 512MB
Just add the above snippets of code to the onClick function for the button in question
Aug 6 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Research-13 | last post by:
thank
3
by: Amjad | last post by:
Hi, I just wrote a test Windows Service that creates a text file on startup (please see my code below). The file is never created. Protected Overrides Sub OnStart(ByVal args() As String) Dim...
3
by: The Woo | last post by:
Can one programatically create a file folder which has the same name as a key field, using a command button? Or, Can there be a a command button which opens up a directory tree to a specified...
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:...
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...
24
by: biganthony via AccessMonster.com | last post by:
Hi, I have the following code to select a folder and then delete it. I keep getting a Path/File error on the line that deletes the actual folder. The line before that line deletes the files in...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
3
by: dearamitdubey | last post by:
hello All , I am using the below given code to create a folder on a click event from a button. The Folder name should be a string which i am taking it from the text box value. now my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
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...
0
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...
0
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,...

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.