FileSystem.FindInFiles

  • Thread starter Thread starter mp
  • Start date Start date
M

mp

more newbie questions :-)

in context of Microsoft.VisualBasic.FileIO.FileSystem.FindInFiles(sFolder,
sFindThisString, ignoreCase, searchType, sFileNameFilter)

sFileNameFilter is an array of strings for filename matches

I'm not finding in help how to create an array none of the examples given in
help work in this context

(array statement or function from vb6 no longer exists)

(select case variations)

trying to build paramarray for sFileNameFilter to honor multiple matches
such as

Dim sFileNameFilter() As String

Select Case iLispOrVb

Case 1

ReDim sFileNameFilter (1) = {"*.lsp", "*.txt"}' doesn't work (end of
statement expected)

Case 2

'sFileNameFilter = {"*.bas", "*.cls", "*.frm", "*.txt"} 'doesn't work
(expeccted expression)

'sFileNameFilter() = {"*.bas", "*.cls", "*.frm", "*.txt"} 'doesn't work
(expeccted expression)

ReDim sFileNameFilter(3) = {"*.bas", "*.cls", "*.frm", "*.txt"}' doesn't
work (end of statement expected)

End Select

Thanks for any tips

mark
 
more newbie questions :-)

in context of Microsoft.VisualBasic.FileIO.FileSystem.FindInFiles(sFolder,
sFindThisString, ignoreCase, searchType, sFileNameFilter)

sFileNameFilter is an array of strings for filename matches

I'm not finding in help how to create an array none of the examples given in
help work in this context

(array statement or function from vb6 no longer exists)

(select case variations)

trying to build paramarray for sFileNameFilter to honor multiple matches
such as

Dim sFileNameFilter() As String

Select Case iLispOrVb

Case 1

ReDim sFileNameFilter (1) = {"*.lsp", "*.txt"}' doesn't work (end of
statement expected)

Case 2

'sFileNameFilter = {"*.bas", "*.cls", "*.frm", "*.txt"} 'doesn't work
(expeccted expression)

'sFileNameFilter() = {"*.bas", "*.cls", "*.frm", "*.txt"} 'doesn't work
(expeccted expression)

ReDim sFileNameFilter(3) = {"*.bas", "*.cls", "*.frm", "*.txt"}' doesn't
work (end of statement expected)

End Select

Thanks for any tips

mark

Dim sFileNameFilter() As String
Select Case iListOrVb
Case 1
sFileNameFilter() = new String (){"*.lsp", "*.txt"}
Case 2

.....

End Select

HTH
 
mp said:
more newbie questions :-)

in context of Microsoft.VisualBasic.FileIO.FileSystem.FindInFiles(sFolder,
sFindThisString, ignoreCase, searchType, sFileNameFilter)

sFileNameFilter is an array of strings for filename matches

I'm not finding in help how to create an array none of the examples given in
help work in this context

(array statement or function from vb6 no longer exists)

(select case variations)

trying to build paramarray for sFileNameFilter to honor multiple matches
such as

Dim sFileNameFilter() As String
Select Case iLispOrVb

Case 1

ReDim sFileNameFilter (1) = {"*.lsp", "*.txt"}' doesn't work (end of
statement expected)

sFileNameFilter = New String() {"*.lsp", "*.txt"}



Armin
 
Armin Zingler said:
sFileNameFilter = New String() {"*.lsp", "*.txt"}



Armin

Thanks to Tom and Armin
where do you find these elementary things? I don't see it in the help files
got a .net book on reserve at the local library when it gets in...till then
you're cursed with me
:-)
thats simpler than what I came up with
str(0)=".lsp"
str(1)= ".txt"
which did work but sheesh! :-)
thanks
mark
 
Armin Zingler said:

believe me, that was the first thing i try! :-)
Now i see F1 does more when connected to internet(rarely) than when in
vbexpress(usually)
I tried to download msdn for vbexpress but in the instructions it says
control panel/add remove progs/additional options/msdn
but under additional options there is onlly one choice - silverlight
so i guess i have whats available for express already
anywho, thanks for the help
mark
 
mp said:
believe me, that was the first thing i try! :-)
Now i see F1 does more when connected to internet(rarely) than when in
vbexpress(usually)
I tried to download msdn for vbexpress but in the instructions it says
control panel/add remove progs/additional options/msdn
but under additional options there is onlly one choice - silverlight
so i guess i have whats available for express already
anywho, thanks for the help
mark


I'm not sure... Anyway, IIRC, you can also download the full "MSDN
library for VS 2008" for free which integrates into VB Express well.
I've used it while I was using VB Express (beforing buying VS 2008 few
weeks ago). Uninstall MSDN Express library before (if it's there).


Armin
 
Patrice said:
Hello,


You may want also to try :
http://www.microsoft.com/DOWNLOADS/...D0-F775-40BF-A191-09F5A95EF500&displaylang=en
and pick the chapters you are insteresting into (this is the VB language
specification).

It should be quite efficient at giving an overview even quickly and then
you can return and give a closer look for a particular features when
needed...

Great Thanks for the links
I also got the msdn for 2008 iso, now to find how to mount it without having
to dig out my old burner
mark
 
Thanks, I had found magicdisc on first googling and that worked fine.
is decompress the same as mount (use as if it were in a drive)?
And thanks for that previous link, great samples
msdn is also up and F1 is happy
:-)
thanks
mark
 
Back
Top