Page 1 of 1
Putting the data in a workfile create line of code
Posted: Wed Mar 15, 2017 8:43 am
by miorinnovo
Hi
I have a program that runs creates a workfile, and I would like to be able to just save everything I do everyday and start fresh the next day. Is there a way to name the workfile using today's date automatically (i.e. without the save as and typing in the date)?
Thanks!
Re: Putting the data in a workfile create line of code
Posted: Wed Mar 15, 2017 8:52 am
by EViews Gareth
Code: Select all
%filename = "workfile_" + @strnow("YYYY-MM-DD")
wfsave %filename
Re: Putting the data in a workfile create line of code
Posted: Wed Mar 15, 2017 9:03 am
by miorinnovo
Thanks!
Here's a follow up. I had it saving to a specific location before, but it doesn't do that anymore. Do you know how to make that tweak so it saves in a location of my choosing?
I was using:
Code: Select all
create(page=annual) r:\\Eviewsfiles\Eviews a 1981 2018
Re: Putting the data in a workfile create line of code
Posted: Wed Mar 15, 2017 9:08 am
by EViews Gareth
Code: Select all
%filename = "r:\EViewsfiles\EViews\workfile_" + @strnow("YYYY-MM-DD")
wfsave %filename
Re: Putting the data in a workfile create line of code
Posted: Wed Mar 15, 2017 9:13 am
by miorinnovo
That's awesome, thanks again.
By the way, is there a way to get a similar type of automated naming from the prg file when I save it?
Re: Putting the data in a workfile create line of code
Posted: Wed Mar 15, 2017 9:49 am
by EViews Gareth
No.
Re: Putting the data in a workfile create line of code
Posted: Wed Mar 15, 2017 9:54 am
by miorinnovo
Ok thanks gareth.