Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I create a VB app that will create folders? 1

Status
Not open for further replies.

lokiloki

Programmer
May 31, 2001
5
0
0
CA
Hi
Does anyone have an example of a VB app that will create folders in my directory. The problem is that I have an access datbase in which I enter information on problem tickets and for every ticket that I create, I must go to a certain directory and copy four generic folders along with their generic checklists and paste them in my private folder.
I must then go and rename the folders and checklist with the name of my tickets and date. I would like to make it so I have a VB app open with a few text boxes for criteria (like the name of my ticket, type of ticket and date) and when I hit the button these generic folders and checklists are created or copied and put in my private folder. If anyone has any examples of anything remotely similiar that they could send to me or any suggestions I would really appreciate it, because I'm not sure where to start.
Thanks
 
This probably entails more overhead than is necessary and if anybody has a more 'correct' solution, I'd love to hear it as well.
I use the 'Microsoft Scripting Runtime' library.
The FileSystemObject in that library has a CreateFolder method.

Select the library in your Project References.

Dim FSO As New FileSystemObject
FSO.CreateFolder "FolderPath"

There's also a CopyFolder method... well the library contains just about anything you want to do with files.
 
Good, John. You deserve more than a star for reminding everybody that VB still has the ability to perform ordinary tasks without external references, without calling multiple APIs while recursing a public class, without shelling to the command line or using a batch file, without using the dreaded and omnipresent SendKeys....

Bless you and have a happy holiday.

VCA.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top