awstats_buildstaticpages.pl not creating required filename


 

Current User: Guest Login Register
Please consider registering

Search 
Search Forums:


 




awstats_buildstaticpages.pl not creating required filename

Add a New Topic Reply to Post
UserPost

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 231

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 231

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 231

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 

Add a New Topic Reply to Post


Reply to Topic: awstats_buildstaticpages.pl not creating required filename

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 6 + 12        (Required)

Topic Reply:


 

WebStats1


About the InternetOfficer.com forum

Currently Online:

1 Guest

Maximum Online: 31

Forums:

Groups: 2

Forums: 7

Topics: 109

Posts: 516

Members:

There are 29 members

There are 95 guests


Jean-Luc has made 231 posts

Top Posters:

Steve - 14

angelko - 5

cwei - 4

KevinA - 3

Kinglui - 3

Administrator: Jean-Luc | Moderators: Jean-Luc


© Simple:Press Forum - Version 3.1.2 (Build 340)