Author Topic: Batch file help  (Read 1334 times)

0 Members and 1 Guest are viewing this topic.

Offline britbob

  • Member
  • *
  • Posts: 5
Batch file help
« on: February 07, 2025, 07:52:07 AM »
Anyone have a good understand of windows/ms batch files?

I have an old piece of Windows software that has a built in ftp scripting option on a scheduler. Unfortunately it won't work anymore because most hosts provide a secure ftp environment these days which it can't cope with!!

The software does everything I need, it dumps the created images in a folder locally on my c: drive but obviously without ftp working it won't upload them to the host via ftp.

Does anyone know how to write a windows batch file that will ftp all the images (wild card??) in the local folder to a designated folder within my hosting environment.

I can schedule the batch file every hour through windows, thus achieving what the software used to do.

Hope this makes some sense!!!

Offline swright1957

  • Senior Member
  • **
  • Posts: 90
    • Hytheweather.co.uk
Re: Batch file help
« Reply #1 on: February 07, 2025, 08:45:42 AM »
Hi
Winscp ftp program can schedule ftp uploads to a website host.  So if your batch file loads everything to a folder then Winscp could upload them for you.
Download it and give it a try.

https://winscp.net/eng/docs/guide_schedule

"anything's possible with the weather"



Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1469
  • BismarckWeather.net
    • BismarckWeather.net
Re: Batch file help
« Reply #2 on: February 07, 2025, 08:56:05 AM »
I'm also using WinSCP with the linked method. It's worked flawless for me.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline britbob

  • Member
  • *
  • Posts: 5
Re: Batch file help
« Reply #3 on: February 07, 2025, 10:52:12 AM »
Thanks guys, and it can capture all the .png's in a folder and upload them such as wild card style?

I'll have a look as the docs and figure out how to write the script/commands to make it happen.

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1469
  • BismarckWeather.net
    • BismarckWeather.net
Re: Batch file help
« Reply #4 on: February 07, 2025, 12:28:50 PM »
Here is my command, with login edited.  I'm sure you could change that to a wild card, although I haven't tested it.

_______________________________________________________

open ftp://cumulusmx%40bismarckweather.net:password@bismarckweather.net/

put C:\CumulusMX\data\dayfile.txt dayfile.txt
# Your command 2

exit
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI