File searching method and system

The invention relates to a file searching method and system. The file searching method comprises the steps of: analyzing an input query condition for selecting a corresponding comparison command; pre-compiling according to the comparison command and the query condition to generate a query command; and returning a comparison result according to the query command and file names to be compared. The invention not only realizes fuzzy matching of the file names, but also saves the time of searching the file names, so that the file matching speed is increased, and million-level files can be located within dozens of milliseconds.