decorative banner

Previous | Next               Table Of Contents > 3 File transfer commands > 3.5 Dealing with duplicate files

3.5 Dealing with duplicate files


During a download or an upload, if a file with the same name already exists in the destination path, the setduperules command can be used to specify a set of rules to compare the files by size or date and then choose to skip, overwrite, resume, or rename the file. The predefined keywords bysize and bydate are used to compare the files either by size or by date. The predefined keywords skip, overwrite, resume, and rename are used to specify the type of action to perform. An action is specified for each of the possible three cases - smaller/older, same size/date, and larger/newer. If the rename option is chosen for any of the three cases, an extension string to be used to rename the file can be optionally provided. The default rename extension is .fbak.

The syntax is

setduperules <keywords: bysize, bydate>, <action if smaller/older>, <action if same size/date>, <action if larger/newer> [, optional: <rename ext string>];

Some examples are

setduperules bysize, resume, skip, skip; #resume if smaller, skip if same size or larger

setduperules bydate, overwrite, skip, skip; #owerwrite if older, skip if same date or newer

setduperules bysize, rename, skip, rename, ".0503"; #skip if same size, rename with ext ".0503" if size is different


Previous | Next