Calendar
AppendDate
A small util­ity ap­pend­ing dates to file and di­rec­tory names
Grzegorz Kraszewski

Ap­pend­Date is a small CLI based pro­gram for Mor­phOS. It can be used for au­toma­tion of nam­ing logs or sim­i­lar pe­ri­od­i­cally cre­ated files, when an ap­pli­ca­tion gen­er­at­ing them can't do it it­self, or nam­ing scheme is not flex­i­ble enough. The pro­gram is dis­trib­uted as free­ware with full source code on BSD two-clause li­cense.

Download

Ap­pend­Date 1.4 (12 kB) for MorphOS 2.x, on MorphOS Files. The source code is in­cluded in­side the archive.

Arguments

Usage: AppendDate FILE/A, DAYS/K/N, FORMAT/K, PREFIX/S, EXTENSION=EXT/S

Examples

Let's assume today is 2008-06-27.

Ap­pend today date with de­fault for­mat to file 'foo'. On my sys­tem (coun­try set to Poland) it gives the re­sult "foo_2008-06-27":

AppendDate foo

Ap­pend yes­ter­day date in YYYY-MM-DD for­mat, date is sep­a­rated by a dot. The re­sult is "foo.2008-06-26":

AppendDate foo DAYS -1 FORMAT ".%Y-%m-%d"

Ap­pend just a today week­day name, with fancy sep­a­ra­tor. The re­sult is "ir­clog from Fri­day":

AppendDate irclog FORMAT " from %A"

Ap­pend date in the de­fault for­mat as pre­fix (re­sult is "2008-06-27_­foo"):

AppendDate foo PREFIX

Ap­pend YYY-MM-DD date to a pic­ture, sep­a­rated with a dot, pre­serv­ing ex­ten­sion (re­sult is "pic­ture.2008-06-27.jpg").

AppendDate picture.jpg EXT FORMAT .%Y-%m-%d

History

Last updated: 05 Dec 2015