Hey All,

Hoping you can help with my little issue.

I am writing a KiX script to run each day. This script rars up data on one network location and transmits it across the WAN to a new location and puts it in a directory based upon the date, then extracts the data.

While doing this, it logs all the information to a log file on the destination drive in a LOGS directory (funnily enough).

My problem is that while
Code:
MD "$ARCHIVEDRIVE\@YEAR@MONTHNO@MDAYNO"

works fine, where $ARCHIVEDRIVE is a declared drive letter at the top of the script and would produce J:\2006121 for today, I can get no variation of
Code:
$ARCHIVE = @YEAR + "-" + @MONTHNO + "-" + @MDAYNO
$ARCHIVE = @YEAR + @MONTHNO + @MDAYNO
$ARCHIVE = @YEAR@MONTHNO@MDAYNO


Work for producing the same result.

The first code option defines $ARCHIVE as being 2019 (riddle me why that happens), as does the second, while the third gives me 121 on one line and 2006 on the next.

I am using KiXtart 2010 4.50.

Can anyone either help me redefine $ARCHIVE obtaining the correct results as per the MD results, or figure out why my definition of $ARCHIVE isn't defining correctly given I want the output (for today, for example to be 2006121)???? I could even handle if it gave the result of 2006-12-1.

Pax

edit: I should note that I am using the $ARCHIVE variable as a base for creating the rar file, log file and copying the data, and don't really want to use @YEAR@MONTHNO@MDAYNO throughout the entire script if I can help it. Would this really work though considering I cannot get KiX to define it correctly at the top.


Edited by Pax (2006-12-01 10:53 AM)