1. An information processing apparatus, comprising: a setting unit configured to set an image file naming rule by setting each of a plurality of items that configure a file name; a determination unit configured to determine whether or not any one of the plurality of items includes an item for which information that defines the file name to be unique is set; and a restriction unit configured to restrict information that can be set for a target item of the plurality of items, if the determination unit determines that none of the plurality of items includes an item for which the information that defines the file name to be unique is set, upon changing information set for the target item.