---
title: "how to create new folder in c# on button click?"  
description: "how to create new folder in c# on button click?"  
author: "Anonymous User"  
published: 2013-06-08  
updated: 2013-06-08  
canonical: https://www.mindstick.com/forum/1010/how-to-create-new-folder-in-c-sharp-on-button-click  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# how to create new folder in c# on button click?

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances),\
I want to create new folder on [button click](https://www.mindstick.com/forum/790/form-gets-submiited-twice-on-button-click) [event](https://www.mindstick.com/articles/167719/marquee-hire-benefits-of-event-lighting-hire-london) in C#. Please provide line of [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) or any [article](https://www.mindstick.com/articles/95867/are-you-looking-for-500-credit-score-mortgage-lenders-houston-continue-reading-this-article)/[blog](https://www.mindstick.com/articles/12705/myths-and-misconception-about-blog) [links](https://www.mindstick.com/blog/415/css3-links)!\
Thanks in advance.

## Replies

### Reply by Vijay Shukla

Hello Brad pitt!Below is a small code snippets for creating a folder or directory in C#.\
public partial class Form1 : Form{ public Form1() { InitializeComponent(); } private void button_Click(object sender, EventArgs e) { System.IO.Directory.CreateDirectory(@"c:\mindstick"); }}


---

Original Source: https://www.mindstick.com/forum/1010/how-to-create-new-folder-in-c-sharp-on-button-click

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
