List The Directories Like (c:,d:) In Combobox?
Sep 1, 2009how to list the directories like (c:,d:) in combobox
View 2 Replieshow to list the directories like (c:,d:) in combobox
View 2 RepliesI'm trying to make a simple program to list a directory and sub directories on an ftp. I haven't found anything simple to do this other than a dll made for ftp commands. There are two problems with that dll, the first is I can't get recursing through directories to work right and it has a trial period. So I'm wondering if there is a simple pure VB way to simply list directories on an ftp. The dll I've played with is ChilkatDotNet2.dll.
View 4 Replieshow can i add image directories using List Of(T). I can only know to add integers, strings e.t.c
View 4 RepliesI'm learning VB and having a few problems with getting a list of all folders/directories on the system. I'm using the code included here and it seems to work until it hits the recycle bin folder, and some other system folders..[code]
View 2 RepliesThe following statement returns ALL directories in DirPath
"For
Each Dir
In
My.Computer.FileSystem.GetDirectories(DirPath)"
How can I identify those directories that should be excluded from general use, such as $Recycle.bin, System Volume Information
In other words, dulicate the function of Windows Explorer.
why my code is not listing the sub directories in the list box?
Public
Sub SubDirButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubDirButton.Click
[Code].....
I am trying to create a list of all virtual directories within an IIS site. However, I have found that trying to do this varies dramatically in the older versions of IIS. In IIS 7 this is a relatively easy task via C# but I can't seem to find a good method for doing this in IIS 6 and 5. I have tried using the System.DirectoryServices.DirectoryEntry but that doesn't seem to give me the desired output. I am the server administrator so I'm open to using other things such as .vbs files that are built into IIS as well as writing my own code.
View 4 RepliesI am trying to Add the name of every folder in a directory to a combobox as a string to use in other code. Then I would like to truncate the last 3 characters off of the folder names.Example:
My main directory is C:Main
My sub folders are C:MainsubOne_bp
C:MainsubTwo_bp
C:MainsubThree_bp
I want a combo box with the following added durring run time.
subOne
subTwo
subThree
The following code will get me the folder names in the combo box, BUT it will not truncate the _bp off of the end and they are added as IO.DirectoryInfo that cannot be used as a string in other tasks.
Dim dir As String = "C:Main"
If (System.IO.Directory.Exists(dir)) Then
Dim di_dir As New IO.DirectoryInfo(dir)
[code]....
My directory structure is like below.
Parent directory
---Sub directory 1
---Sub directory 2
------Sub directory2a
------Sub directory2b
---Sub directory 3
I am writing in VB.net to fetch all the directory names (including sub directories in all the levels).However while using directory.getfilesystementries(path) I am getting only the top level sub directories.how to fetch all the subdirectory names of all sub levels?
I am trying to list directories in decending order by directory name. They are still being listed in accending order. Can someone please help me fix the below code as I can't seem to get it working correctly.I am not getting an error with the below code, its showing the list in accending order by name.
Dim oDirInfo As New DirectoryInfo(Server.MapPath("Test/" & Session("Test")) & sSubDir)
Dim oDirs As DirectoryInfo() = oDirInfo.GetDirectories()
For Each oDir As DirectoryInfo In oDirs
oDir.GetDirectories().OrderByDescending(Function(eachDir) eachDir.Name).FirstOrDefault()
Try
[Code]...
IIS7 running on Windows Server 2008 R2. Development environment is VWDE 2010.
I'm setting up a simple "machine status" page to monitor a server. I want to display the Drives on the machine, including mapped network drives and show their free space, etc.
I'm using System.IO.DriveInfo.GetDrives() to return a collection of DriveInfo objects. I then itterate that collection to display the relevant information.
The issue I'm having is that only local drives appear. (A:, C: and D:) No mapped drives "Network Locations" appear in the collection.
I'm thinking it has to do with the user account that's executing the code (if that makes any sense). So if the code is executing under the user "ASPNET" (or whatever it is) the drives would have to be mapped under that user. As it happens, I have the server set up like a workstation and it logs in automatically under the user with the mapped drives.
What I've done:
- I have set the Web Site's Anonymous Authentication user to that same user
- I have set the Identity of the Application Pool to which my web site is assigned to be that same user.
im been messing with media player in my app. Great little feature Problem: I have a list of directories in an array. when a user double clicks a treenode in my treeview, i use this directory and add the correct extension to play the file. It works fine but when i click the 2nd node the media player plays the 1st movie again. My question is do i have to clear the media players memory (URL) in order to play my 2nd file?
[Code]...
I'm trying to create a Combobox List and I created the following my first try:
Private Sub ComboBox1_DropButtonClick()
ComboBox1.List = Array("LI-3:comparing and contrasting two or more print sources based on
[code].....
display files within a directory and subdirectories and write these directories and their files to a text file.
View 2 RepliesI have a button ad a list box, the button when clicked lets the user select a directory on the HDD, and then the app is meant to list all the sub directory's of that folder int he list box. However I cant seem to get it to list just the sub directory names, not the full paths, and also to only scan by 1 folder deep (selected foldersub folder).
View 1 RepliesI'm having some trouble with list boxes at the moment. I need a list box to display the names of directories that are in certain a folder. How can I do this?
View 3 RepliesThis is currently the code I am using.
Dim fileList As Collections.ObjectModel.ReadOnlyCollection(Of String) = My.Computer.FileSystem.GetFiles(FolderDialog1.SelectedPath, FileIO.SearchOption.SearchTopLevelOnly)
For Each topLvlFile As String In fileList
[code]....
The above code reads all the files & directories in a selected path. It ignores any hidden folders, like it suppose to. Except it doesn't ignore folders inside of the hidden folders that it finds & I need it to.I can't quite wrap my head around how to make it ignore all folders & files inside of a hidden folder that it find.
I am new to vb.net and I am using visual studio 2010. I have two comboboxes on a form, each combobox is set to DropDownList so that a list of items can show in the combobox, but no text is allowed to be entered.
For combobox A, if user chooses item 1, the list of combobox B should be updated accordingly. I think this is quite common on a lot of applications. But I do not know to implement it. I even do not know the keyword to search for the relevant property or event handler.
[Code]....
it just creates 1 folder but not other folders with in folder.
[Code]...
I'm making a combobox on a form. I want the combobox to have a list of choices from a table in a db. The two columns are a String and a Date. I want the date column to only show the year. I'm hoping I have the code right as it is above, but I'm not positive I've done the whole date thing right.
I need to list all files folders, subfolders and subfolder files under a selected directory in a list box not sure how to do the logic in the last amount of code lines to enumerate all subfolders dna files.Here is what I have so far:
Dim OldProfileDir As String
Dim NewProfileDir As String
Dim Newdocs As String = ""
Dim Olddocs As String = ""
[code].....
Basically I'm going to try and develop a software that merges PDFs automatically using the PDFSharp API.What I want in the program is to basically that: Have the program to give and Input and Output directoryMerge all the documents in the directory or sub-directoryRename the merged PDF file according the the name of the directory/sub-directoryIf the folder has PDF files and a Sub-Directory I want to merge the PDF files in the folder and rename them as per the main folder, and rename the files in the sub-folder according to its name (i.e. seperate|)
It's the first time I'm using an API.The problem I have is how to use the directories and sub-directories as I need them.
I've been trying to fix this for a while now and have yet to find a solution that works, I want it so that when an item is added another of the same name cannot be added. Here's what I have
Dim i As Integer
For i = 0 To ComboBox1.Items.Count() - 1
If ComboBox1.Items.Item(i) = TextBox1.Text Then
'do nothing
Else
[Code]...
I was useing VB a lot for some years ago and now I have started again..then, think I was useing VB3 or VB4 there was a property on ComboBox and listboxes that allows only to select the values in the Combox.. Not able to write own values..
View 1 RepliesI used to have the following code in a module that returned a string array to my main Form and used .addrange to put them into a combobox
Friend Function getPrimeContracts2() As String()
Dim i As Integer = 0
Dim count As Integer = 0
[code].....
Instead of a list box, I create a combobox and as I introduced the names she goesby recording and sharing this with other combobox from other forms?
View 1 RepliesHow can i get the integer value alone from the combobox list. For examle, if the item in the combobox is "ABC 01", i want to get the value "01" alone into my code for processing. How can i do it?
View 3 RepliesI'm using VS2008, VB.Net and WinForms. I cannot get the combobox droplist to display the most recently added item unless I quit the app and restart. I've searched thru several forums for answers but cannot get any to work for me
Private Sub cboSpecialty1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboSpecialty1.KeyDown
Dim objCommand As SqlCommand = New SqlCommand
[code].....
I am trying to make it so when i choose a item in the combo box the list box is cleared i have tried these two codes and i cannot thing of any others but it does not work can someone help me? [Code]
View 1 RepliesThis is my first post so be gentle . I have tried to create form with combo. Combo has source in Access database. What I want is for combo to check user input, if not in list, prompt "Add new item to source table" and if "Yes" add new item (row) to source table. I have been working in Access and this is new t
View 4 Replies