:: Purpose: Hide current versions of some (locked?) ZTree files so that a fresh :: version of ZTree can be installed without quitting this session. :: SET _d=date SET _t=time VER | FIND "Windows 2000" >NUL IF NOT ERRORLEVEL 1 GOTO W2K VER | FIND "Windows XP" >NUL IF NOT ERRORLEVEL 1 GOTO WXP GOTO W9X :W2K :: Date is shown as: 'Sat 2003-12-25' and time as: '16:55' :: a b c a b FOR /f "tokens=2-4 delims=- " %%%%a in ('DATE/T') do SET _d=%%%%a%%%%b%%%%c GOTO GET_TIME :WXP :: Date is shown as: '2003-12-25' and time as: '16:55' :: a b c a b FOR /f "tokens=1-3 delims=- " %%%%a in ('DATE/T') do SET _d=%%%%a%%%%b%%%%c GOTO GET_TIME :W9X echo W9X TODO... SET _d=TO SET _t=DO GOTO GOT_STAMP :GET_TIME FOR /f "tokens=1-2 delims=: " %%%%a in ('TIME/T') do SET _t=%%%%a%%%%b :GOT_STAMP echo Time-stamp: %_d%%%_t% :: ZTree BUG? Why do I need %%% below? echo Renaming #ZThome\#ZTexe to ZTW_%_d%%%_t%.EXE echo. REN #ZThome\#ZTexe ZTW_%_d%%%_t%.EXE echo Copying #ZThome\ZTW.HLP to #ZThome\ZTW_%_d%%%_t%.HLP COPY #ZThome\ZTW.HLP #ZThome\ZTW_%_d%%%_t%.HLP DIR /OD #ZThome\ZTW_*.* Pause :EXIT