Privacy policy. Often, within Windows applications you create, you will have to prompt users to select a folder, most frequently to save a set of files. In a procedure, check the FolderBrowserDialog component's DialogResult property to see how the dialog box was closed and get the value of the FolderBrowserDialog component's SelectedPath property.
If you need to set the top-most folder that will appear within the tree view of the dialog box, set the RootFolder property, which takes a member of the Environment. SpecialFolder enumeration. Additionally, you can set the Description property, which specifies the text string that appears at the top of the folder-browser tree view.
In the example below, the FolderBrowserDialog component is used to select a folder, similar to when you create a project in Visual Studio and are prompted to select a folder to save it in. In this example, the folder name is then displayed in a TextBox control on the form. Active Oldest Votes. Improve this answer. Question, how can I get all the files inside of all the subdirectories as well? There's probably a pre-defined method for it, but otherwise just right a simple recursion.
Ugh, that's write a simple recursion, sorry. Cyclone: please read the documentation that was linked. Hint: Directory. AllDirectories did it. Much easier than what I was trying to do with it lol AddRange Directory. Nirav Nirav 31 1 1 bronze badge. CSV", SearchOption. Add New clsImportFiles filenm Next.
Rodrigo Salgado Atala 1 1 gold badge 6 6 silver badges 23 23 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. I do that often with temp folders that I create:. Using that parameter you could delete all the files matching to specified filter and keeping folder structure as it is Good point there. I wasn't thinking as all of my 'temp files' are all simple subfolders I create from the user's application folder.
You cant do what? Try to typing out the word. This is not social network where people get lazy to typing out simple word and forum does not have characters limit.
Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:. Archived Forums. Visual Basic. Not for VB6 questions. Sign in to vote. Hi some one know how to do this but with another path a customized and noy my documents?
0コメント