[EMAIL PROTECTED] wrote:
> I was wondering if there is a way on NT to rename a file to include a
> datestamp in the name. Basically I want a task to run nightly that will
> stop Apache, rename the logfile to something like "access.log.20010108",
> then restart Apache. I'm not sure if this can be done in a regular batch
> file, but I'm fairly certain that it can be done in Perl or VBScript.
You can't do this with regular batch files tools and I don't know of any tools
out there to do that. You can do it with Perl or VBScript quite easily. Perl
would use something like this:
perl -e'@d=localtime; rename $ARGV[0], $ARGV[0].$d[5].$d[4].$d[3];'
Jeremy Wadsack
Wadsack-Allen Digital Group
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------