D
Dan W
Hi there. I am parsing a text file and as I parse each line I need
to go out to two different directories and check to see if any files
beginning with the string I just parsed exist. For example... if the
first line in my text file is AS1501 then I need to check Dir1 and see
if there are any files that begin with AS1501 then I need to go to
Dir2 and check there also. I am trying to check using the following
code...
If File.Exists(Dir1 + "\" + subDir + "\" + pString + "*.pdf") Then
Do some stuff
End If
I used a messagebox to verify that the string that's being built does
point to the correct place and I've verified that the .pdf file I am
trying to check for does exist. However, when I put this IF THEN
statement in it never finds the file. I assume that this is because
it is seeing the asterisk as a literal asterisk rather than a wildcard
symbol. Just wondering if there is any way around this.
I'm new to vb.net and any help would be greatly appreciated.
Thanks!
to go out to two different directories and check to see if any files
beginning with the string I just parsed exist. For example... if the
first line in my text file is AS1501 then I need to check Dir1 and see
if there are any files that begin with AS1501 then I need to go to
Dir2 and check there also. I am trying to check using the following
code...
If File.Exists(Dir1 + "\" + subDir + "\" + pString + "*.pdf") Then
Do some stuff
End If
I used a messagebox to verify that the string that's being built does
point to the correct place and I've verified that the .pdf file I am
trying to check for does exist. However, when I put this IF THEN
statement in it never finds the file. I assume that this is because
it is seeing the asterisk as a literal asterisk rather than a wildcard
symbol. Just wondering if there is any way around this.
I'm new to vb.net and any help would be greatly appreciated.
Thanks!