Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > General Computer Discussion > General Computer Support > folder.GetDirectories

Reply
Thread Tools

folder.GetDirectories

 
 
murulimadhav murulimadhav is offline
Junior Member
Join Date: Sep 2010
Posts: 1
 
      09-28-2010
Hi,
I am developing one Image gallery based on folders and directories using scripts of image gallery from Scott Mitchell ().
And in this we use Dim subFolders As DirectoryInfo() = folder.GetDirectories()
And in this i am filtering the directories like
Dim subFolders As DirectoryInfo() = folder.GetDirectories("*Trips*")
And , my question is can we add more filters like
Dim subFolders As DirectoryInfo() = folder.GetDirectories("*Trips*,*Tours*") etc...
This script i typed is not working, and just for example i gave this here sir.
I hope i will get my question answered here
yours faithfully
murulimadhav

the script is
Private Function AddNodeAndDescendents(ByVal folder As DirectoryInfo, ByVal parentNode As TreeNode) As TreeNode
'Add the TreeNode, displaying the folder's name and storing the full path to the folder as the value...
Dim virtualFolderPath As String
If parentNode Is Nothing Then
virtualFolderPath = VirtualImageRoot
Else
virtualFolderPath = parentNode.Value & folder.Name & "/"
End If

Dim node As New TreeNode(folder.Name, virtualFolderPath)

'Recurse through this folder's subfolders
Dim subFolders As DirectoryInfo() = folder.GetDirectories("*Tour*")
For Each subFolder As DirectoryInfo In subFolders
Dim child As TreeNode = AddNodeAndDescendents(subFolder, node)
node.ChildNodes.Add(child)
Next

Return node 'Return the new TreeNode
End Function
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57