|
-
Nov 18th, 2009, 05:06 AM
#1
Thread Starter
Hyperactive Member
what to type to search all files?
Hi is there any easy way to search all files?
like
Code:
strExtension = "*.TXT"
'but instead i wanna search for all files like txt and exe and doc and so on...
'I thought of *.* as u do in cmd controle.
'But i didnt get it to work anyone knows how to Search For All Files.
'I allready got everything else so right now i can If said search for .txt or if said .Doc but not if i wanna search for every file can find...
Last edited by goofan; Nov 18th, 2009 at 05:19 AM.
-
Nov 18th, 2009, 05:43 AM
#2
Re: what to type to search all files?
Your question is not clear to me... 
What code are you using...????
Is it VB6...???
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 18th, 2009, 05:53 AM
#3
Thread Starter
Hyperactive Member
Re: what to type to search all files?
my question is i got a search engine.... and in it i set extension to be "either .txt or other by using radiobuttons. What i want is to have a radiobutton so i can search for all extensions...
In CMD its called *.* then u search all extension (if i remember correctly)
i hope u understand
-
Nov 18th, 2009, 05:57 AM
#4
Re: what to type to search all files?
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 18th, 2009, 05:57 AM
#5
Re: what to type to search all files?
The above code allows wildcard searches...
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 18th, 2009, 05:58 AM
#6
Thread Starter
Hyperactive Member
Re: what to type to search all files?
code for the dir opening and such is:
Code:
strmessage = vbCr & "" & dirdialog.path
If right(fildialog.path, 1) = "7" then
strmessage = fildialog.path & fildialog.filename
Else
strmessage = fildialog.path & "/" & fildialog.filename
End If
Folderpath = strmessage
If option1.Value = true then
strExtension = "*.Txt"
'more of these'
end if ..... thats what i can sow u =) i want the
If option1.Value = true then
strExtension = "*.Txt"
to be like
If option1.Value = true then
strExtension = "*.*"
'searching all files'
but i dont know what i need to code to see all the files.
-
Nov 18th, 2009, 05:59 AM
#7
Thread Starter
Hyperactive Member
Re: what to type to search all files?
hmm i cant really get that into my coding...
-
Nov 18th, 2009, 06:02 AM
#8
Re: what to type to search all files?
 Originally Posted by goofan
code for the dir opening and such is:
Code:
strmessage = vbCr & "" & dirdialog.path
If right(fildialog.path, 1) = "7" then
strmessage = fildialog.path & fildialog.filename
Else
strmessage = fildialog.path & "/" & fildialog.filename
End If
Folderpath = strmessage
If option1.Value = true then
strExtension = "*.Txt"
'more of these'
end if ..... thats what i can sow u =) i want the
If option1.Value = true then
strExtension = "*.Txt"
to be like
If option1.Value = true then
strExtension = "*.*"
'searching all files'
but i dont know what i need to code to see all the files.
  
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 18th, 2009, 06:04 AM
#9
Thread Starter
Hyperactive Member
Re: what to type to search all files?
that is where i select what kind of extension i need (at the end of the code ure quoting)
-
Nov 18th, 2009, 06:06 AM
#10
Thread Starter
Hyperactive Member
Re: what to type to search all files?
tell me what u need explained or if u dont understand something
-
Nov 18th, 2009, 06:07 AM
#11
Re: what to type to search all files?
Did you find any error while using *.* ?
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 18th, 2009, 06:12 AM
#12
Thread Starter
Hyperactive Member
Re: what to type to search all files?
well as i use *.*
it only opens .txt files! :?) and i dont know why no error nothing it just opens "only" .txt for some reason
Last edited by goofan; Nov 25th, 2009 at 04:50 AM.
-
Nov 18th, 2009, 06:15 AM
#13
Thread Starter
Hyperactive Member
Re: what to type to search all files?
ohh never mind i dont know why it aint showing the others but i know why it shows the txt...
.:.Ok my problem.:.
as i type in sand into my search box and tells it to search *.* it will look into every file it opens however it dont seem to open .doc for some reason and i know it sais sand in the .doc aswell as i typed it in just before.
-
Nov 18th, 2009, 11:44 PM
#14
Re: what to type to search all files?
Ok... So you are saying that you can't find the word you are searching, on MS Word files... ???
Do one thing... Open your MS Word document using Notepad (right click the file, then in Open With menu, choose Notepad )
Did you see the word.... ??? 
MS Word files are different from text files....
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 19th, 2009, 01:07 AM
#15
Addicted Member
Re: what to type to search all files?
There are many filetypes that use proprietary formats. This includes MS Word, WordPerfect, PDF Format and others. Even if you are able to open these documents in a binary mode and read the contents into a string doesn't mean you will find the Ascii text in that binary string. Frequently it will look like mumbo-jumbo.
The above post is correct. Open a .doc or .pdf file in Notepad and then search for the word. Chances are you will not find it.
To accurately search a proprietary format you'll need to convert it to text or use com object to open a file and search.
-
Nov 24th, 2009, 03:26 AM
#16
Thread Starter
Hyperactive Member
Re: what to type to search all files?
ok so i cant open it normally but how do i convert it? i need to be able to search throught all files!.
isnt there some kind of aplication or code that makes it possible to search all files with "any" extension.
-Thanks in advance
-Thomas
-
Nov 24th, 2009, 03:38 AM
#17
Re: what to type to search all files?
Will this help you..??? 
Click Here
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Nov 24th, 2009, 04:10 AM
#18
Thread Starter
Hyperactive Member
Re: what to type to search all files?
well i cant download anything as the work computer, the local server dont allow it. And then i dont really know (as i couldn´t download it) if the program where the application itself. What i ment when i said "is there any aplication or code..." was lika a API within Vb 6.0. Like an
addon sort of function.
Are u possible to show me a part of a code that solves this problem? (just so i can modifie it myself)
-Thanks in advance
-Thomas
Last edited by goofan; Nov 24th, 2009 at 04:15 AM.
-
Nov 24th, 2009, 06:10 AM
#19
Re: what to type to search all files?
 Originally Posted by goofan
ok so i cant open it normally but how do i convert it? i need to be able to search throught all files!.
isnt there some kind of aplication or code that makes it possible to search all files with "any" extension.
There is code... but it can be very complex, and you need different code for almost every file type you want to work with.
For example, to read an Excel file (.xls or .xlsx etc) the easiest way by far is to use Automation, as shown in my Excel tutorial (link in my signature). Unfortunately this needs Excel to be installed - and it will only work for a small amount of file types.
To read other MS Office based files, see the relevant articles in our Office Development FAQs (at the top of the Office Development forum)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|