Received: by 10.150.154.5 with SMTP id b5mr1817719ybe.11.1233109034094; Tue, 27 Jan 2009 18:17:14 -0800 (PST)Date: Tue, 27 Jan 2009 18:17:14 -0800 (PST)X-IP: 67.244.104.237User-Agent: G2/1.0X-Google-Token: dZBKsgwAAACixbDSqOqJRB_RW2fdSujAX-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; GTB5; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe)Message-ID: <9f4ad645-68ca-4cf3-8bc3-2ed3384d6906@i18g2000prf.googlegroups.com>Subject: Newbie QuestionFrom: Brad <brad.nemetski>To: “Kdb+ Personal Developers” X-Google-Approved: charlie@kx.com via web at 2009-01-28 07:00:31How do you save to a variable filename?For example say I wanted to save something daily and append the day tothe file, so today the file would be:myFile01272009.csvwhile next week it would be:myFile02042009.csvthanks in advance!–Brad</brad.nemetski>
Date: Wed, 28 Jan 2009 15:15:42 +0800Message-ID: Subject: Re: [personal kdb+] Newbie QuestionFrom: Aaron Davies <aaron.davies>To: personal-kdbplus@googlegroups.comthe direct way would be to unpack the save functionq){($":myFile",(string .z.D),".csv")0:","0:x}tthat will save table t to myFileDATE.csvthe other approach would be to use save as is and move the fileq)save
t.csv;q)system"mv t.csv myFile",(string .z.D),".csv"or the dos equiv (ren?) if you’re on windowsOn Wed, Jan 28, 2009 at 10:17 AM, Brad <brad.nemetski> wrote:>> How do you save to a variable filename?>> For example say I wanted to save something daily and append the day to> the file, so today the file would be:> myFile01272009.csv> while next week it would be:> myFile02042009.csv>> thanks in advance!>> --Brad>> >>– Aaron Daviesaaron.davies@gmail.com</brad.nemetski></aaron.davies>