Eyenok Solutions Inc. ([EMAIL PROTECTED]; Wednesday, March 12, 2003 12:37 PM):
> Hi, > I wish to automaticaly make Analog create a "report.dat" file every > month and then I want ReportMagic to pick up that file. To keep it > clean and usable, I want to keep individual all report files so I > put them in a directory and name them like so : report_%Y-%M.dat. > Now because I'm asking Analog to make a monthly report for last > month, the output file will be named "report_2003-02.dat" if I run > the script this month. I then want to use a similar method to make > ReportMagic grab the right report file, wich is the one for last > month. The problem is that year tags in ReportMagic use the current > date, so it looks for "report_2003_03.dat". > Can I make Analog output a file with the current date even if I'm > using FROM and TO in the cfg file? If not, how can make these two > sync together? Analog outputs the file based on the last date in it. This makes the most sense, especially three years down the road when you (or someone else) is trying to figure out what period is covered by report_2003_02.dat. Report Magic can't know without opening the file that the data in in a previous month. So it MUST use the current date for the input file. However, in both places, if you are on a unix system, you can use the 'date' command to insert the value you want to use. e.g. analog -Oreport_`date +%Y-%m`.dat rmagic.pl --statitics_File_In=report`date +%Y-m`.dat On windows you can do this too with for and set or something. Check in the list archives for this. I never remember how to do it. -- Jeremy Wadsack Wadsack-Allen Digital Group +------------------------------------------------------------------------ | TO UNSUBSCRIBE from this list: | http://lists.isite.net/listgate/analog-help/unsubscribe.html | | Digest version: http://lists.isite.net/listgate/analog-help-digest/ | Usenet version: news://news.gmane.org/gmane.comp.web.analog.general | List archives: http://www.analog.cx/docs/mailing.html#listarchives +------------------------------------------------------------------------