D
David C
We have a intranet web site that displays a hyperlink if the subfolder on
the network file system contains 1 or more physical files. The file system
is pointed to by a virtual directory on our web site. I am using the code
below to check for existing folder and if not found, create it. My problem
is that sometimes the subfolder name does not exactly match the name we are
looking for. However, if the 1st 4 characters are the same I want to
consider it a match (found directory) but I don't know how to do that. I
also want to use the GetFiles with that partial match to get the file count.
Can anyone help? Thanks.
David
If My.Computer.FileSystem.DirectoryExists(strPath) = False Then
My.Computer.FileSystem.CreateDirectory(strPath)
End If
If My.Computer.FileSystem.GetFiles(strPath).Count = 0 Then
varCtl = e.Row.FindControl("HLViewDocs")
varCtl.Text = ""
Else
e.Row.Cells(11).CssClass = "Show"
End If
the network file system contains 1 or more physical files. The file system
is pointed to by a virtual directory on our web site. I am using the code
below to check for existing folder and if not found, create it. My problem
is that sometimes the subfolder name does not exactly match the name we are
looking for. However, if the 1st 4 characters are the same I want to
consider it a match (found directory) but I don't know how to do that. I
also want to use the GetFiles with that partial match to get the file count.
Can anyone help? Thanks.
David
If My.Computer.FileSystem.DirectoryExists(strPath) = False Then
My.Computer.FileSystem.CreateDirectory(strPath)
End If
If My.Computer.FileSystem.GetFiles(strPath).Count = 0 Then
varCtl = e.Row.FindControl("HLViewDocs")
varCtl.Text = ""
Else
e.Row.Cells(11).CssClass = "Show"
End If