Go to my homepage
Session Tunes
Black Book
   
Olitunes
Stuff
   
Home
   


Go to my homepage

Systems Stuff


How to automatically include the current date in a batch created file
@ECHO OFF
 REM routine to generate date in format yyymmdd
 FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%L%%K%%J
 REM routine to generate date in format ddmmyyy
 REM FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%J%%K%%L
 ECHO The value is "%mydate%"

So, to use in a batch file to backup directories to a number of zip files, each ending in "-yyymmdd.zip":
@echo off
   set clzip=c:\"program files"\winzip\wzzip.exe
   rem routine to generate date in format yyymmdd
   FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%L%%K%%J
   %clzip% -u g:\backup\album-configs-%mydate%.zip -rP d:\photographs\album
   %clzip% -u g:\backup\palm-%mydate%.zip -rP d:\configs\palm
   %clzip% -u g:\backup\utils-%mydate%.zip -rP c:\progra~1\utils
   %clzip% -yp -u g:\backup\docs-%mydate%.zip -rP d:\docs
   pause

Problemss with Windows Update

Around Feb 2006 Microsoft started to force "Windows Genuine Advantage". There's a bug in that process. Before pressing 'Custom' or 'Express' buttons paste this text to the address bar and press enter:

javascript:void(window.g_sDisableWGACheck='all')

It turns off the trigger for the key check.


nlite