This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

file and date

Old posts that have not been replied to for several years.
Locked
s
sirkrunch
Voice
Posts: 19
Joined: Wed Oct 09, 2002 2:36 am

file and date

Post by sirkrunch »

Code: Select all

set datenow [clock format [clock seconds] -format %m][clock format [clock seconds] -format %d][clock format [clock seconds] -format %y]
set file_pre "perfect"
set file_end ".txt"
set file_name $file_pre$datenow$file_end
is what i'm using atm, is there a way to make it smaller?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

set file_pre "perfect"
set file_end ".txt"
set file_name "${file_pre}[clock [clock seconds] -format "%m%d%y"]${file_end}"
You can scrap the file_pre and file_end, but it makes things a little simpler to read.
s
sirkrunch
Voice
Posts: 19
Joined: Wed Oct 09, 2002 2:36 am

Post by sirkrunch »

thanks :)
Locked