Patent ID: 8760671

Claim:
An image forming apparatus comprising: an external storage medium receptacle configured to receive an external storage medium including files containing image data; an input device configured to accept an extraction condition setting request and extraction condition data from a user; a printing mechanism; and a controller configured to: determine whether an external storage medium including files containing image data is received by the external storage medium receptacle; determine whether a request of manual print is accepted by the input device in response to determining that the external storage medium is received by the external storage medium receptacle; enter a manual mode to set an extraction condition to extract files from the external storage medium in response to determining that the request of manual print is accepted; enter an automatic mode to extract files from the external storage medium based on a preset extraction condition in response to determining that the request of manual print is not accepted; determine whether the extraction condition setting request is accepted by the input device in response to determining that the external storage medium is not received by the external storage medium receptacle and the request of manual print is not accepted; receive an extraction condition from the input device in response to determining that the extraction condition setting request is accepted; store the extraction condition in a memory; determine whether an external storage medium including files containing image data is received by the external storage medium receptacle in response to storing the extraction condition in the memory; determine whether the files that satisfy the extraction condition stored in the memory exist in the external storage medium in response to determining that the external storage medium is received by the external storage medium receptacle; extract the files that satisfy the extraction condition stored in the memory from the external storage medium in response to determining that the files that satisfy the extraction condition stored in the memory exist in the external storage medium; and control the printing mechanism to print an image based on image data in at least one of the extracted files.