An image-forming apparatus having a plurality of hot folders, the image-forming apparatus configured to execute a process, set in connection with a given hot folder, on a first document, in a case that the first document is submitted to the hot folder, comprising: a setting means (501, S706) adapted to set the process to be executed for the hot folder on the basis of setting information that defines merging the first document with a second document stored in a storage area and printing the merged document in a case that the first document has been submitted to the hot folder; an execution means (200, S710) adapted to, in a case that the first document is submitted to the hot folder, execute merge printing of the submitted first document and second document stored in the storage area based on the setting by said setting means; an access right setting means adapted to set an access right on the second document to inhibit deletion of the second document in a case where setting information indicates use of the second document, wherein said access right setting means is configured to set the access right on the second document at the time of setting the process to be executed for the hot folder; determination means configured to, in a case that the setting information is cancelled, determine whether or not the second document is also being used by another hot folder; and changing means configured to, in a case that the setting information is cancelled, change the access right set on the second document to an access right on the second document to allow deletion of the second document if the second document is determined by the determination means as not being used in another hot folder, and not to change the access right on the second document if the second document is being used in another hot folder. a setting means (501, S706) adapted to set the process to be executed for the hot folder on the basis of setting information that defines merging the first document with a second document stored in a storage area and printing the merged document in a case that the first document has been submitted to the hot folder; an execution means (200, S710) adapted to, in a case that the first document is submitted to the hot folder, execute merge printing of the submitted first document and second document stored in the storage area based on the setting by said setting means; an access right setting means adapted to set an access right on the second document to inhibit deletion of the second document in a case where setting information indicates use of the second document, wherein said access right setting means is configured to set the access right on the second document at the time of setting the process to be executed for the hot folder; determination means configured to, in a case that the setting information is cancelled, determine whether or not the second document is also being used by another hot folder; and changing means configured to, in a case that the setting information is cancelled, change the access right set on the second document to an access right on the second document to allow deletion of the second document if the second document is determined by the determination means as not being used in another hot folder, and not to change the access right on the second document if the second document is being used in another hot folder. an access right setting means adapted to set an access right on the second document to inhibit deletion of the second document in a case where setting information indicates use of the second document, wherein said access right setting means is configured to set the access right on the second document at the time of setting the process to be executed for the hot folder; determination means configured to, in a case that the setting information is cancelled, determine whether or not the second document is also being used by another hot folder; and changing means configured to, in a case that the setting information is cancelled, change the access right set on the second document to an access right on the second document to allow deletion of the second document if the second document is determined by the determination means as not being used in another hot folder, and not to change the access right on the second document if the second document is being used in another hot folder.