Beginner VB

Moderators: None (Apply to moderate this forum)
Number of threads: 1233
Number of posts: 2978

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Creating a directory Posted by YAHA on 14 Mar 2005 at 5:36 PM
I am writing an accounting program and I need to create directories(folders)to store files. Could somebody tell me what is the shortest and fastest way to do that(to create a directory using Visual Basic Code).

Thanks a lot.
Report
Re: Creating a directory Posted by Sparky Progger on 30 Jun 2005 at 4:14 AM
: I am writing an accounting program and I need to create directories(folders)to store files. Could somebody tell me what is the shortest and fastest way to do that(to create a directory using Visual Basic Code).
:
: Thanks a lot.
:

I'm at a computer, which doesn't have VB installed (oh, the pain, THE PAIN!), so I can't check to see if my answer really works... But I believe, that the easiest way to create folders is this:

MkDir(Path As String)

At least, I seem to remember, that it's called MkDir (Make Directory)

An example (Yay, we love examples, don't we?!):

MkDir "C:\myNewlyCreatedFolderWhichHasAVeryLongName"


Once again, I can't check up on it, but I hope it'll work for ya


Good luck, and happy programmin'.
Report
Re: Creating a directory Posted by nappel on 30 Aug 2005 at 3:34 AM
2 ways:

MkDir "C:\new"

or exotical ) (use MS-DOS commands):

Shell ("mkdir c:\new")


VB Documentation http://www.geocities.com/oflameron/




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.