Welcome, Guest. Please login or register.

Author Topic: drawer named from date  (Read 4797 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kolla

Re: drawer named from date
« on: January 29, 2020, 03:14:58 PM »
Yeah, dream on :)

You wish to format the output of C:Date, but VERY SADLY, C:Date does not support that, so you have to jump through hoops around the problem.

Code: [Select]
Echo to T:timestamp
Makedir `List DATES T:timestamp LFORMAT %D`
Delete T:timestamp QUIET

This creates a temporary file, which you then can list with LDORMAT %D to get the date from, but you need "DATES" parameter or it will always say "Today", and then make a directory with this name - also SADLY it will be 29-Jan-20 and not 29-01-2020, and there is little you can do about that, and also this output depends on locale, so in case of the month of May, a system with English locale will for example say "29-May-20", while with Norwegian locales will say "29-Mai-20" and Swedish "29-Maj-20" etc.

If you think that this is all crazy and should be corrected, you can join my whining choir...
« Last Edit: January 29, 2020, 03:19:32 PM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kolla

Re: drawer named from date
« Reply #1 on: February 01, 2020, 11:22:23 AM »
Huh, why resort to third party software - even though AmigaDOS date is tedious in all kinds of ways, ARexx DATE works fine, for example
Code: [Select]
Makedir `rx “SAY DATE(S)”` may be good enough, it makes a 20200201 directory today.
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline kolla

Re: drawer named from date
« Reply #2 on: February 01, 2020, 12:41:11 PM »
A thirdparty tool is as good as a dependency on AREXX, but i like any different solution of course. :)

The problem is that over time, your path fills up with a range of third party tools that you no longer have any idea where they came from or what they really do :)  ARexx you can count on being there, and it's in general a better choice for scripting.

Btw - if anyone feel like reporting an OS bug... well, ARexx bug - DATE(CENTURY) is supposed to return the number of days in this century, but it really looks more like the number of days since 01-01-1900, and not since 01-01-2000. So it's really a "Y2K" bug.
« Last Edit: February 01, 2020, 12:41:44 PM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS