[gradsusr] Bat file

Chorley Weather weatherstu at chorleyweather.com
Mon Jul 20 14:04:37 EDT 2015

Hi guys,

Complete stab in the dark here but I've hit a brick wall. I'm trying to 
run my bat file using the script below, but it is returning an error 
(see attached image). My gs script runs fine when i input the date 
manually, for example 20150720 06, but as you can see from the image, 
the bat file is not pulling the date correctly. Any help would be 
greatly appreciated.

set FileDate=%date:~9,4%%date:~6,2%%date:~3,2%
set FileTime=%time:~0,2%

if /i %FileTime% gtr 00 (
set T=12
set /a FD=%FileDate% - 1
if /i %FileTime% gtr 01 (
set T=18
set /a FD=%FileDate% - 1
if /i %FileTime% gtr 05 (
set T=00
set FD=%FileDate%
if /i %FileTime% gtr 11 (set T=06)
if /i %FileTime% gtr 17 (set T=12)
@echo Year = %FD%
@echo Time = %FileTime%
echo %T%

opengrads -lbxc 'nw1.gs %FD% %T%'

Best regards,

Stuart Markham
Chief Forecaster & Owner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture.PNG
Type: image/png
Size: 35926 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20150720/906ecb3b/attachment-0001.png 

More information about the gradsusr mailing list