This invention allows a user to easily classify and manage image files by
recording an image file obtained by image capture and an image file
obtained from an external apparatus in different folders. For this
purpose, a system control unit which controls an overall digital camera
determines whether the latest image data stored in a storage medium is
image data captured in an image pickup mode or image data received in a
communication mode. The system control unit then determines whether the
current mode is the image pickup mode or the mode which allows reception.
If the current mode coincides with neither of the two modes, since it
indicates that the source of the image data to be saved in a storage
medium differs from the source of the latest saved image data, the system
control unit turns on a folder creation flag for the creation of a
folder.