[gradsusr] Bat file
Chorley Weather
weatherstu at chorleyweather.com
Tue Jul 21 07:23:53 EDT 2015
On 21-07-2015 10:07, Becker, Bernd wrote:
> switch to Linux or run grads under Cygwin.
>
> -----Original Message-----
> From: gradsusr-bounces at gradsusr.org
> [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Chorley Weather
> Sent: 20 July 2015 19:05
> To: gradsusr at gradsusr.org
> Subject: [gradsusr] Bat file
>
>
> 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.
>
>
> @ECHO OFF
> 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
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
Thanks for the reply, had a feeling that was the path required.
--
Chief Forecaster & Owner
More information about the gradsusr
mailing list