News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

search files

Started by six_L, April 30, 2007, 05:12:32 AM

Previous topic - Next topic

six_L

Quote
symbol comment:
   (T) Thanks
   (^) background reason
   (!) Info
   (*) Change
   (+) Addition
   (-) Removal/Fix
   (?) problem
   (%) hint to use

;//----------------------------------------------------------------------------
      Search the files in PC. 2007-4-28
;//----------------------------------------------------------------------------

[T] Thanks all who provide the source codes in the forum. i used your code. here, i don't notice your name one by one.

[^] 1.  After you'v download much files from internet over long times, you only remember a bit information,don't know where it is.
    2.  to use the searching function in explore.exe is not easy to find.
    3.  if opened the file to check one by one, it's led me to be a touch of headache.

[!] 1.  search the file, that means found the path of file.
    2.  according to the file and directory name(Case-Insensitive or sensitive) to search.
    3.  according to include and noninclude of the file and directory name(Case-Insensitive or sensitive) to search.
    4.  according to a bit content(words) of file to search.
    5.  according to the part content of file in disk to search.
    6.  according to the date(Creation or LastAccess or LastWrite) of file to search.
    7.  according to the time(Creation or LastAccess or LastWrite) of file to search.
    8.  according to the Sizes(B,K,M,G) of file to search.
    9.  open the list file with your selected software(Radasm,Notepad,Word,Excel,Photshop,AutoCAD...).
    10. shrink the range step by step. change the filtered condition to search again and again, until you find it.

[?] the source codes has a lot of messy, hope and welcome you report bug, optimize, simplify, improve it.

[%] 1.  if you opened the commom dialog to select the start path, put any characters without its childen directory name. that means you'll select the current directory.
    2.  put the "*" in the SearchDir, that means you'll search something in all storage(harddisk,floppydisk,cdrom...)
    3.  if there is nothing in the Match, that means you'll list all files and all directories from the start directory. and so on as include and noninclude in advanced "Name".
    4.  while the "Start" button changed into "Start(R)" button, you may search again. the "ClearF" button clears the found list. on same time, you can't use search again.
    5.  the "OK" button means to use the conditon of advanced searchfile; the "X" Close button means to no use the conditon of advanced searchfile.
    6.  the time of creation(or LastAccess, or LastWrite) is in the date group.
    7.  the selection of ListOpenWith is always valided at any times.
    8.  Click the Topic of list for sort by name or date or time or size.

i need to format the source code,found it on next week.

[attachment deleted by admin]
regards

ramguru

Hi, six_L
I've played a little with your program  :U
I noticed one annoying thing:
after I choose advanced mode, "Match" line stays disabled 4 ever, even I leave "Advanced" window empty and press "OK". I think "Match" line should become enabled after search is complete.

One suggestion: it would be nice if your program had internal viewer (notepad as optional), so when I double click on record in "Filtered" listbox your program automatically show content of that file with necessary content scrolled into view.

Thanks for nice program

lingo

Nice ideas but your code is very slow...
I tested it 2 times with SearchDir: c:\  and Match: *.* and your best time is 22 min.
My best time is 2min...(see attachment)

I assume you followed the advice of the "easy readable assembly code" apologists:  :lol
Quote"Don't optimize for speed your code because under Windows we use a lot of slow API functions"
 
and
QuoteIt is "a good practice" to keep your code easy readable, hence don't optimize it for speed because your code will become  not readable
 
and
Quoteblah, blab...bla
 
Sorry, but the results are results! :lol

Regards,
Lingo


[attachment deleted by admin]

six_L

#3
Hello,ramguru and lingo.
thanks for you are interesting.
add the source code into the frist post.

i had be away the forum recently, sorry for post it late.

because the SearchForFile used the recursive method, i don't know how estimate the searching to be end. so used a foolish method(the Checking Index don't increase).

ramguru,
QuoteOne suggestion: it would be nice if your program had internal viewer (notepad as optional), so when I double click on record in "Filtered" listbox your program automatically show content of that file with necessary content scrolled into view.
it is too difficult to me. because it need to control other softwares.if the file in listview will be opened  with photoshop.exe or acad.exe or UltraEdit-32.exe..., i must control photoshop.exe or acad.exe or UltraEdit-32.exe.

lingo
QuoteI assume you followed the advice of the "easy readable assembly code" apologists:  lol
Quote
"Don't optimize for speed your code because under Windows we use a lot of slow API functions"

and
Quote
It is "a good practice" to keep your code easy readable, hence don't optimize it for speed because your code will become  not readable
i would do, but no ability.
i admire your ability on the speed of codes. the matter about speed of codes is in the high level. it isn't a thing which i take into account. i hope it has
1. the fine functions
2. useable
3. the simple operation.
4. the nice GUI



regards

six_L

[-] Removal/Fix
shift out the limit of listview lines on searchagain.
regards