You must Sign In to post a response.
  • Category: Windows

    Folder Create on user desktop in windows application

    I need to create a windows application in exe format. When i click the exe file, it must create a new folder with the name welcome in desktop.
    Asp.Net with C#

    How could i acheive this through coding in the windows application.
  • #768699
    what you want to do exactly ? create a folder with windows application or with an web based application ( )
    System.IO namespace will help you create a folder in windows application on desktop
    see below snippet

    System.IO.Directory.CreateDirectory("Desktop path\\welcome" );
    //to get desktop path use following code
    string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

    //now the full code is
    System.IO.Directory.CreateDirectory(path + "\\welcome" );

    hope it helps

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #768706

    What you have tried so far, first you have to create console application to execute the exe purpose, later just make a code as you want.

    If you want to create folder then use below piece of code, this helps you to create folder


    using CreateDirectory you can easily create the folder.

    Hope this helps you...

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • Sign In to post your comments