Short: Appends dates to file and directory names Author: Grzegorz Kraszewski Uploader: Grzegorz Kraszewski Type: util/cli Version: 1.3 Architecture: ppc-morphos >= 1.4.0 AppendDate homepage: http://teleinfo.pb.edu.pl/~krashan/software/appenddate Visit the homepage for usage examples. AppendDate 1.3 (04.07.2008) (c) 2008 Grzegorz Kraszewski AppendDate -- appends a date to a filename or directory name. Usage: AppendDate FILE/A, DAYS/K/N, FORMAT/K, PREFIX/S, EXTENSION=EXT/S Arguments: FILE - A patch to a file or directory, which name is to be changed. May be absolute or relative to the current dir. This argument is required. In case of directory name, it must not contain the trailing '/'. DAYS - Optional offset between current date and the date to be appended. For example DAYS=-1 will append yesterday date. The default value is 0 (today). Note that resulting date can't be earlier than 1978-01-01. FORMAT - Optional date format specifier. It is a string with printf()-like placeholders replaced by date components. Date string in this case is generated with locale.library/FormatDate(), so its documentation applies. The most useful placeholders are repeated here just for user convenience: %a - abbreviated weekday name (uses current locale) %A - weekday name (uses current locale) %b - abbreviated month name (uses current locale) %B - month name (uses current locale) %d - day number with leading 0s %D - same as "%m/%d/%y" %e - day number with leading spaces %h - abbreviated month name (uses current locale) %j - julian date %m - month number with leading 0s %U - week number, taking Sunday as first day of week %w - weekday number %W - week number, taking Monday as first day of week %x - same as "%m/%d/%y" %y - year using two digits with leading 0s %Y - year using four digits with leading 0s If this argument is not given, the date is formatted with the default date format for a country set in the system locale preferences. The date is separated from a filename with '_' (underscore) in this case. PREFIX - Places the date at the start of name instead of the end. EXTENSION - Smart inserting at the end. If the file name has an extension (separated by a dot), the date is inserted before extension. If there are multiple dots in the name, the last one is considered as extension separator. Note that this argument is ignored, if PREFIX is specified. Release notes: 1.3 (03.07.2008) - Added: EXTENSION and PREFIX arguments. - Fixed: FormatDate() has been called with NULL locale which resulted in a crash if FORMAT has been used with textual date elements like week or month names. 1.2 (27.06.2008) - Fixed: DAYS argument was ignored if FORMAT was used.