[gradsusr] gradsscript through batch file

Marsh, Kieren k.marsh at geos-uae.com
Tue Sep 4 09:56:58 EDT 2012


Part of the batch file you need:

 

******************************

for /f "tokens=1,2,3 delims=/ " %%a in ("%date%") do set day=%%a&set month=%%b&set year=%%c

 

SET SystemDate=%year%%month%%day%

 

:: Time format with leading zeroes

SET Now=%Time: =0%

SET HHH=%Now:~0,2%

 

:: Call GrADS script (making sure GrADS is on your PATH)

grads.exe -cpb 'my_grads_script.gs %SystemDate% %HH%'

 

******************************

In your GrADS script:

 

Subwrd(args, 1)  will pick up the date passed %SystemDate%

Subwrd(args, 2)   will pick up the time passed by %HH%

 

 

 

 

 

From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of bala vasanthakumar
Sent: 22 August 2012 13:42
To: GrADS Users 
Subject: [gradsusr] gradsscript through batch file

 

Dear Grads user

 

 can any one pls help me how to call the grads script through batch file by passing the date and time in the batch file itslef. 

 

 

Thanx and regards 


 <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?> 

Follow Rediff Deal ho jaye! <http://track.rediff.com/click?url=___http://dealhojaye.rediff.com?sc_cid=rediffmailsignature___&cmp=signature&lnk=rediffmailsignature&newservice=deals>  to get exciting offers in your city everyday.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120904/4e8fa242/attachment-0003.html 


More information about the gradsusr mailing list