Queryer help doc

Quick File Locater, build by yuchifang for maomao Nov 26, 2005, Beijing, China

This program is target to locate the file on your disk quickly on your disk by the filename.

Start form zero
Rebuild
Exact query
Blur(Wildchar/Regex)Query
Filter query result
VisualUI command
Command line support
Rebuild On Schedule
Some Tips
FAQ
About
Copyleft

Start from zero

The software packet usually include the following files:

  • libdb43.dll : Berkerley DB engine
  • msvcp71.dll : C++ stl
  • msvcr71.dll : C++ stl
  • psapi.dll   : Command line support
  • queryer.exe : Main program
  • unires.lng  : Language file
  • update.bat  : Rebuild on schedule
  • help.html   : Help file
  • main_ui.jpg : The main window snap shot file

Put these files under one folder, note that although the software itself is not big, but the database may be large, so you may need about 10M-100M bytes of free disk space. The size will be larger when you have more than 1,000,000 files on your disk.

Then Run the Queryer.exe, you may see the following user interface:

Ö÷½çÃæ

Next step: Build the file database

Rebuild the file database

This software query based on a file database, the Rebuild operation is to speed up the query process.

In main UI, click "Rebuild" button, then a confirm box shown up, if you choose yes the rebuild process is started from now. you can click Stop button to stop the rebuild process, but this will cause the file database in an inconsistent state, so please be patient when you have up to 100,000 files. After the rebuild is completed you can go next step: query. There are two query styles: Exact query and Blur query.

If you need to rebuild the database on schedule, find the answer here.

Exact Query

Input the exact file name(include file extension) in the "Input Box", then press "GO" or just press Enter to start the query. You may notice that the query progress is shown in Information Box and Progress Bar and Status Bar. When the query is finished, all the result are shown in the Result Box.

If you have got a lot of results, Result Filter is needed. And if you like, you can copy the file name, open file or the containing folder. Note that the query is case insensitive.

What can I do when I just can't remember the whole file name? Here we go: Blur Query

Blur(Wildchar/Regex)Query

Usually, to remember the exact filename is not as easy as your lover's name. So we need blur query here. This functionality let you query when only know part of the file name. Blur query have two styles:


1. Wild char query, include "?" and "*"

 

Inputted file name can contain '*' and '?', '*' represent any string, while "?" represent one or zero character, you can use them in a mixed way.

Example:

Input Means
*.doc Query all the Word documents
*love* every file have a "love" in the name
test?.txt represent this kind of files: test.txt, test3.txt, testa.txt

 

2. Regex query

 

Regular express query, notice that begin with a '/' in your query string. Please search online for the readings about regular expression. Tow examples here:

Input Means
/^test.?\.txt$ just as same as test?.txt
/^\d*\.txt

query all the files that only have numbers in file name and the file extension is "txt"

Note that the query is case insensitive. This means \D is turned into \d, sorry for the inconvenient.

Like what I said before, I you have up to 1,000,000 files in your PC, the query process is long, and the result is rich - rich enough to get you in trouble, now you may need a Result Filter.

Filter Result

You can filter the result by using the "Filter Box", after your query is completed, you can type some keywords here to filter the result, something like "d: love" indicate you only want the files in disk D: and the file paths which contains "love". you may notice that the result is filtered while you type in the key words.

If you are querying in a specific folder, a better practice may be fill the path in the Filter Box first, then query the result. This is faster than query all, and you lose nothing - when you remove the keywords in the result filter, you will find the results are still there just as not filtered.

Visual UI Command

 

These command can be used in the Input Box.

help:Shows the help info, use "help copy" or "help open" to see help about "copy" and "open" command
copy:Copy command, copy the result path into clipboard
Grammer:copy[@|a]dddd" or ":c[@|a]dddd", dddd indicate a decimal value, represents the serial number shows in the result window. '@' and 'a' stand for the containing folder instead of file it self.
open:Open the file using default program or open the containing folder
Grammer:open[@|a]dddd" or ":c[@|a]dddd", dddd indicate a decimal value, represents the serial number shows in the result window. '@' and 'a' stand for the containing folder instead of file it self.

Command Line support

Programmers always use command line instead of UI, especially when the software is extra large. Queryer also can be used under command line. Here I suppose that guys who use command line is some how a senior in computer operations, so the help doc is more simple here:

Format      : Queryer [Filename|:update] ["filter keywords "]
Exact Query : Queryer test.cpp
Blur Query  : Queryer ?test*
Regex Query : Queryer /.*test.*/
With Filter : Queryer test.cpp "d:"
Rebuild     : Queryer :update\r\n
Help        : Queryer /?\r\n

Example:
Command: Queryer /^\d*\.txt "d:\email love"
Result : All the file names that fulfill the following requirements:
1. only takes digit as file name and extension is "txt",
2. under folder "d:\email" and have "love" in the full file path

Note that Rebuild command(notice the colon sign)is useful when you want to update the file database on schedule. This is for the defect of this program: it need rebuild manually because automatic rebuild is not supported by design. See Rebuild on schedule.

Rebuild on schedule

Due to the limited resources, the automatic update of file database is not supported by design. You can use command line ":update" command to relief the pain of manually rebuild. This is how:
1. Build a short cut of update.bat(find it in the software packet), name it anything you like, such as "UpdateIT"

2. Open "My Computer -> Control Panel -> Scheduled Tasks", Double-click to open the "add new tasks", press "Next" on the pop-up dialog.
3. Push "Browse..." button and choose the shortcut we made in step1, open it.
4. Choose task name and the time, for example "run every day", Press "Next" and pick a convenient time you want to do the update, that should be idle time for the computer. Then press "Next"
5. Input user name and password, click "Next"
6. "Finish"! Oh yeah~

Some Tips

  • In the main UI, select some text and "Right-Click" your mouse, the selected text is copied into clipboard
  • Use up/down key in the input box to view the history of inputted query strings
  • You may notice that there are keyboard accelerators for each Button/TextBox, when you press Alt plus the Char which has under-line. Examples: Alt + i to back to input box, Alt + F you to go to Filter Box, Alt + S to stop the query process, etc.

FAQ

Q:Is query case sensitive

A:query is case insensitive. This means \D is turned into \d, sorry for the inconvient.

Q:How can I change the UI language ?

A:The unires.lng file is an unicode-text file that contains all the UI strings. You may substitude the strings in that file to get an UI of specified language. the Help.html and main_ui.jpg can be translated also. Please send me a copy of help.html / main_ui.jpg / unires.lng of your new language in email, thanks.

Q:Why there are no results shown up while the label on the top of Result Box shows a non-zero result number?

A:That number indicate all the found files, but the result only shows those who agree with the filter key words. Check if your filter key words are empty or not.

Q:Why there are no result while I can see the file does exist?

A:When ever you meet this situation, please rebuild your database if you want the correct result. Because this software does not support automatic update of file database, so you may need rebuild it manually when you made a lot of Add/Remove/Rename operations.

Q:Why build this software? There are Google and MSN desktop search?

A:Three reasons:
1. This is intially for My girl maomao,so that she won't miss the file when she forgot where is it.
2. Just a practice after learning about wtl, Berkerley DB, and Greta.
3. This software are target to those who always find file based on filename instead of file contents. And it provide command line support and result filter to make query life easier. And, it's small and green.

About

Name: Quick File Locater
Main: Queryer.exe
Author: yuchifang(ξ³Ù·½, realfun, renzhongfang are all my names on internet)
Contact:renzhongfang@nju.org.cn
Build Enviroment: WindowsXP2, Visual Studio 6.0, Build and link with VC8.0
Resources: Greta for regular expression support, Berkeley DB to process file database, wtl to handle the UI operations.
Duty-free announcement: I am not responsible for any problem caused by this software:)

Copyleft

You can copy and distribute this program, but please don't modify any file of the program except unires.lng / help.html / main_ui.jpg, this if for the integrity of the program during distribution process.