Click to See Complete Forum and Search --> : Using system-date in batch-files


kingr
October 13th, 1998, 05:31 PM
The following batch-file works okay in Win95 - but fails in NT:

REM MSDOS Batch file to get system date/time then run Real Encoder
@echo off

REM First read date/time into variables
ver | date > %temp%gd.bat
echo set logday=%%3 >current.bat
echo set logdate=%%4 >>current.bat
call %temp%gd
ver | time>%temp%gd.bat
echo set logtime=%%3 >current.bat
call %temp%gd
del %temp%gd.bat>nul
del current.bat>nul

REM Now we start the Real Encoder

RVBatch RVEncode.exe /O c:\real\publisher\dateline.rm /L /A 28_8.0 /D 000:01:00 /T "28_8.0" /U "http://www.channelafrica.org" /C Recorded %logday% %logdate% at %logtime% (GMT +2) /P 1 /R 1 /Y 0

My "programming skills" ar not enough for me to understand the problem!

Is there a better way?? Any help gratefully recieved..

Many Thanks

Richard King Johannesburg

jwlunt
November 24th, 1998, 05:22 AM
A better way? You bet. Dump that crappy old MS Dos batch and use a quality scriptting tool like U/WIN. It's absolutely brilliant. Get it from www.research.att.com/sw/tools/uwin

You could also use perl, MKS or Cygnus GNUWIN.