none
Creating Folder in VB RRS feed

  • Question

  • Hi,

    I would like to create an executable with Visual Basic which could create a user defined folder wherever i put the executable ( so if i copy the exec to a different drive and run it, it could create the folder there too) also upon creation I want to populate the folder with the content of another folder. ( so as many times I create a folder will be populated with the content of the other folder, sort of multiplying that folder content with different folder names)
    Is there any coding that I can use to create such an executable?
    Wednesday, August 8, 2018 9:43 AM

All replies

  • To create a folder in the executable folder.

    Directory.CreateDirectory(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SomeFolder"))
    For copying see System.IO.File.Copy.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, August 8, 2018 10:33 AM
    Moderator