Batch switches overriding profile report location

I'm writing a batch file that will instantiate wlexpert, and I would like the -r switch to override the settings in the profile.

Or perhaps there is a better way? I'm trying to run end of the month reports, and I would like to create a directory for the previous month. The %mm% value returns the current month, so I need to create a directory with the name %mm%-1 (and also adjust for when the reported month is 1 for month and year decrementing).

Any ideas?

This is what my batch file looks like, but the -r switch isn't overriding the report location specified in the profile setting.

@echo off
rem parse date
For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
Set Month=%%A
Set Day=%%B
Set Year=%%C
)

rem find last month
set /a Month=%Month%-1
if %Month% EQU 0 (SET Month=12)
rem find the last year
if %Month% EQU 0 (SET /a Year=%Year%-1)

if %Month% LSS 10 (SET Month=0%Month%)
if %Year% LSS 2010 (SET Year=200%Year%)

rem display date
:: @echo DAY = %Day%
:: @echo Month = %Month%
:: @echo Year = %Year%
:: pause

WLExpert ProfileName -n"Web Statistics" -r "S:\SharedLocation\Website_logs\%Month%%Year%" -t "Last month" -l "\\LogFileLocation\*.*"

Everything works except that the report location specified in the profile setting isn't being overriden by the -r switch directive.

Thanks

Chris
1 person has
this question
+1
Reply