| User | Post |
|
11:27 am November 2, 2007
| Phil Hannent
Guest
| | | |
|
| |
|
|
Hi,
I have the following command
perl "E:\Program Files\AWStats\tools\awstats_buildstaticpages.pl" -awstatsprog="E:/Program Files/AWStats/wwwroot/cgi-bin/awstats.pl" -builddate=%YY%MM -config=www.learnbubble.com -output -staticlinks -dir=e:/mysite/reports/
However when I run this I get the below filename:
awstats.www.learnbubble.com.MM.html
Problem is that I want the actual Month number in the filename not MM. I clearly am missing something, can anybody point me in the right direction?
Regards
Phil Hannent
|
|
|
12:08 pm November 2, 2007
| Jean-Luc
Admin
| | | |
|
| posts 220 |
|
|
Sorry, but I am not able to reproduce your problem.
I have run this Perl script:
perl awstats_buildstaticpages.pl -awsta
tsprog="D:\MyTestDir\awstats.pl" -build
date=%YY%MM -config=my_domain -output -
staticlinks -dir=d:\MyTestDir\result
and I got 20 files under d:\MyTestDir\result and the file names are awstats.my_domain.0711.html , awstats.my_domain.0711.keywords.html , …
Note that -builddate=%YY%MM%DD returns the date of execution of the script (ie. today's date).
Jean-Luc
|
|
|
4:20 am November 5, 2007
| Phil Hannent
Guest
| | | |
|
| |
|
|
Thank you very much for your quick reply.
I am also running this within a batch file. Perhaps that would be the difference?
Regards
Phil Hannent
|
|
|
4:59 am November 5, 2007
| Jean-Luc
Admin
| | | |
|
| posts 220 |
|
|
Yep, the problem is coming from the batch file syntax.
In a .bat file, a text between percent signs is a variable. In your case, the batch file considers that your %YY% is an undefined variable. Your system finally executes:
perl awstats_buildstaticpages.pl -awsta
tsprog="D:\MyTestDir\awstats.pl" -build
date=MM -config=my_domain -output -
staticlinks -dir=d:\MyTestDir\result
as %YY% has no value.
Jean-Luc
|
|
|
5:04 am November 5, 2007
| Jean-Luc
Admin
| | | |
|
| posts 220 |
|
|
To solve the problem, replace each percent sign by two percent signs in the .bat file. It will look like this:
perl awstats_buildstaticpages.pl -awsta
tsprog="D:\MyTestDir\awstats.pl" -build
date=%%YY%%MM -config=my_domain -output
-staticlinks -dir=d:\MyTestDir\result
Jean-Luc
|
|
|
8:26 am November 5, 2007
| Phil Hannent
Guest
| | | |
|
| |
|
|
Outstanding.
Thank you very much.
Regards
Phil Hannent
|
|