I am developing one Image gallery based on folders and directories using scripts of image gallery from Scott Mitchell (firstname.lastname@example.org).
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
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
virtualFolderPath = parentNode.Value & folder.Name & "/"
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)
Return node 'Return the new TreeNode
|All times are GMT. The time now is 08:34 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.