Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2007, 12:49 AM
Authorized User
 
Join Date: Aug 2006
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default How To Make A New Folder Dynamically

Hi Friends,

           I would like to get your help for creating a new folder in any drive dynamically.I am working with c#.net 2.0 and Sqlserver.

                                  Thank You,
                                          Sumith.
__________________
sumith
 
Old June 22nd, 2007, 06:39 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Its simple mate, the line below will create a folder named "sumith" in C: Drive.

Directory.CreateDirectory(@"c:\sumith");


Regards
Mike

Don't expect too much, too soon.
 
Old June 24th, 2007, 12:21 AM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not sure.. but i think you should check if the directory exists first..
anyway if you need to do that use:

            DirectoryInfo dirTemp = new DirectoryInfo("c:\\MyDir");
            if (!dirTemp.Exists)
            {
                dirTemp.Create();
            }


Nothing is impossible. The impossible only takes longer. "Digital Fortress, Dan Brown"





Similar Threads
Thread Thread Starter Forum Replies Last Post
Base Folder RNedel ASP.NET 2.0 Basics 2 September 5th, 2007 04:33 PM
how to make child dynamically gantait XSLT 1 February 23rd, 2007 06:29 AM
App_Code folder shared on only 1 folder? rpeters83 ASP.NET 2.0 Professional 1 September 1st, 2006 10:53 PM
Making a folder virtual folder on button click in CsharpHelp C# 0 October 26th, 2005 05:57 AM
Craete folder dynamically vinodkalpaka Beginning PHP 2 January 12th, 2005 10:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.