code for creating a folder in your C:\ dive

This is a discussion on code for creating a folder in your C:\ dive within the C# Programming forums, part of the General Programming Boards category; i need a code for a button so when i click it. it makes a folder in the C:\ DRIVE ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    19

    Arrow code for creating a folder in your C:\ dive

    i need a code for a button so when i click it. it makes a folder in the C:\ DRIVE







    i need the code to be where i can choose the name of the folder ONLY IN THE CODE, I DONT NEED IT TO WHEN YOU CLICK A BUTTON THE PROGRAM CREATES A FOLDER AUTO MATICLY WITH THE NAME AND THE PATH THAT I CHOSE IN THE CODE.

  2. #2
    Registered User
    Join Date
    Mar 2009
    Location
    england
    Posts
    209
    Code:
    System.IO.Directory.CreateDirectory("c:\\whatever");

  3. #3
    Registered User
    Join Date
    Sep 2009
    Posts
    19
    DO I put this into button

  4. #4
    Registered User
    Join Date
    Sep 2009
    Posts
    19
    i need it to where i can choose the path and the name

  5. #5
    ...and never returned. StainedBlue's Avatar
    Join Date
    Aug 2009
    Posts
    168
    So you create a textbox allowing the user to enter a name, tie the textbox.text to what was already given to you by theoobe in the event handler for the button click.

    or better yet, bring up a file browser dialog...

    Also,

    1)Don't shout. People will be less willing to help you.

    2)Give us some example code, because what you're saying is kinda vague.
    Last edited by StainedBlue; 09-13-2009 at 08:46 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  2. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 03:17 PM
  3. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 4
    Last Post: 01-15-2002, 11:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21