FileSystem.FindInFiles

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
 
T

Tom Shelton

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
 
A

Armin Zingler

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
 
M

mp

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
 
M

mp

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
 
A

Armin Zingler

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
 
M

mp

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
 
M

mp

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top