Create backup directory Open file for each line in info file next if blank get filename and rename from file push filename and rename onto arrays end for if size of arrays is too small (smaller than @ftp_locations) complain that I don't have enough files exit; end if for each item in file array rename file ftp file move file to backup directory end for send message saying everything worked.