Author Topic: .Bat File Programing for WxSim  (Read 1175 times)

0 Members and 1 Guest are viewing this topic.

Offline George Richardson

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 1391
    • Smith Mountain Lake Weather
.Bat File Programing for WxSim
« on: March 26, 2014, 12:16:49 PM »
Good Morning,

I am using the following .Bat file to transfer modified Wxsim files to a location that Fling will upload them to my website. This works. The situation is, the run of Wxsim can vary as much as 30 minutes so to be safe, I must put the transfer way out. My goal is to modify the .Bat file such that it can be scheduled to run every 5 minutes from the time the modified files could first be available to the time they definitely should be available and, if the files have not been updated the first time through, the .Bat file will not affect the files until they are updated and can be copied.

EXISTING .BAT File

"Rem This Bat file is to be used to transfer forecast files,

lastret.txt and plaintext.txt from wxsim directory to vws/root

directory to be uploaded to internet via Fling.

@echo off

C:

cd "C:\wxsim"

copy lastret.txt "C:\vws\root" /Y

copy plaintext.txt "C:\vws\root" /Y

end"

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

PROPOSED .BAT File

"Rem This Bat file is to be used to transfer forecast files,

lastret.txt and plaintext.txt from wxsim directory to vws/root

directory to be uploaded to internet via Fling.

@echo off

C:

cd "C:\wxsim"

Xcopy lastret.txt "C:\vws\root" /Y /M

Xcopy plaintext.txt "C:\vws\root" /Y /M

end"

TIA

George

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: .Bat File Programing for WxSim
« Reply #1 on: March 26, 2014, 12:59:11 PM »
Fling can be set up to watch a directory for changes to specific files.  See attached image.

Much simpler, and the upload occurs immediately.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline George Richardson

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 1391
    • Smith Mountain Lake Weather
Re: .Bat File Programing for WxSim
« Reply #2 on: March 26, 2014, 01:17:22 PM »
Hey Jerry,

Good thoughts, but I use Fling to upload VWS files from its root directory every 5 minutes and need to upload the wxsim files from its directory every 4 hours. Didn't know Fling can upload from multiple locations on multiple schedules?

George

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: .Bat File Programing for WxSim
« Reply #3 on: March 26, 2014, 02:01:20 PM »
Here's an example.  Just click 'New' and off you go to set up another directory with its own parameters.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline George Richardson

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 1391
    • Smith Mountain Lake Weather
Re: .Bat File Programing for WxSim
« Reply #4 on: March 26, 2014, 03:02:09 PM »
Jerry,

Is your Fling a paid version? Mine is v.2.01 and does not have the mask section.

George

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: .Bat File Programing for WxSim
« Reply #5 on: March 26, 2014, 04:06:07 PM »
Jerry,

Is your Fling a paid version? Mine is v.2.01 and does not have the mask section.

George

Version 2.21, Unlicensed.  Download here for free version?  The 'Full Specifications' there state that the License Model is 'free'.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline George Richardson

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 1391
    • Smith Mountain Lake Weather
Re: .Bat File Programing for WxSim
« Reply #6 on: March 26, 2014, 07:21:34 PM »
Jerry,
Thank you so much. I think everything is under control.
George

 

anything