Current User: Guest Login
Please consider registering


Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

awstats_buildstaticpages.pl not creating required filename

Reply to Post Add a New Topic
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 1125

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 1125

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 1125

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 

Reply to Post

Reply to Topic:
awstats_buildstaticpages.pl not creating required filename

Guest Name (Required):

Guest Email (Required):

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

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
9 + 7
   


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 302

Currently Online:
13 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 638
Posts: 2712

Membership:

There are 257 Members
There have been 305 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
deepakgupta – 34
albert_newton – 30
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: raju, todd2taylor, sbdcunha, mansigill1987, ThomasDuh, ThomasKic

Administrators: Jean-Luc (1125 Posts)

Moderators: Jean-Luc (1125 Posts)