Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

windows ftp.exe

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

windows ftp.exe

Post by n9mfk »

Hi All,
what wood the best command to use to upload a folder like the report
beau
neondesertweather
Posts: 14
Joined: Tue 11 May 2010 5:49 pm
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Las Vegas, Nevada USA
Contact:

Re: windows ftp.exe

Post by neondesertweather »

Hi beau,

Assuming you're using Windows a good program to use is MOVEit Freely from ipswitch http://www.ipswitchft.com/products/move ... index.aspx
It's a command line utility and is a great replacement for the built in FTP command.

It's fairly well documented and easy to use. After installation, I created a batch file that contains the following commands:

Code: Select all

@echo off
ftps -a -s:report.ftp
The -a switch starts the program in passive mode.
The -s:filename tells the program to read a script from a file, in this case report.ftp

report.ftp is located in my C:\Cumulus\Reports subdirectory and contains these commands:

Code: Select all

open yourwebsite.com
yourFtpUserName
yourFtpPassword
cd www/NOAA-reports
put NOAAMO0811.txt
put NOAAYR2011.txt
quit
Most of this is self explanatory. The cd command is used to change directories to the one you want your report files in.

I then use Windows task manager to run the batch file at 12:05am every day after Cumulus has updated the reports.

Hope this helps! :)
Larry
"But it's a DRY Heat!"

Image
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: windows ftp.exe

Post by n9mfk »

Hi Larry,

I was hoping to find a way around changing it every month

Code: Select all

put NOAAMO0811.txt
beau
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: windows ftp.exe

Post by steve »

You need an 'ftp sync' utility so it just checks what files are on your PC and what are uploaded, and keeps the web site up to date.
Steve
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: windows ftp.exe

Post by steve »

Steve
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: windows ftp.exe

Post by mcrossley »

well you could create the script file dynamically...

Code: Select all

@echo off
echo open yourwebsite.com > temp.ftp
echo yourFtpUserName >> temp.ftp
echo yourFtpPassword >> temp.ftp
echo cd www/NOAA-reports >> temp.ftp
echo put NOAAMO%date:~-7,2%%date:~-2,2%.txt >> temp.ftp
echo put NOAAYR%date:~-4,4%.txt >> temp.ftp
echo quit >> temp.ftp
ftps -a -s:temp.ftp
del temp.ftp
Completely untested by the way! And assumes a UK date format dd/mm/yyyy in the date variable
User avatar
steve
Cumulus Author
Posts: 26672
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: windows ftp.exe

Post by steve »

Don't forget that files are created up to the end of the previous day, so on the first of the month the latest monthly report is for the previous month, and on the 1st Jan the yearly report is for the previous year. In other words, you need to subtract a day from the date.
Steve
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: windows ftp.exe

Post by mcrossley »

OK, a different approach then that avoids some horrible batch maths!

Use the file Archive attribute...

Code: Select all

@echo off
echo open yourwebsite.com > temp.ftp
echo yourFtpUserName >> temp.ftp
echo yourFtpPassword >> temp.ftp
echo cd yourWebPath/NOAA-reports >> temp.ftp
for /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt') do echo put %%~a >> temp.ftp
ftps -a -s:temp.ftp
del temp.ftp
attrib -R NOAA*.txt
Oh how long ago was it we used to write batch scripts - very nostalgic :lol:
Or use a file sync utility :roll:
Last edited by mcrossley on Wed 31 Aug 2011 9:09 pm, edited 1 time in total.
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: windows ftp.exe

Post by n9mfk »

Hi Mark,
what is ftp.tmp
also are you using ftp.exe or some other software
thanks beau
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: windows ftp.exe

Post by mcrossley »

The script is written for the utility that Larry mentioned in the second post on this thread. I'm just tweaking his script so you do not have to edit it every month and year end.
neondesertweather
Posts: 14
Joined: Tue 11 May 2010 5:49 pm
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Las Vegas, Nevada USA
Contact:

Re: windows ftp.exe

Post by neondesertweather »

mcrossley wrote:OK, a different approach then that avoids some horrible batch maths!

Use the file Archive attribute...

Code: Select all

@echo off
echo open yourwebsite.com > temp.ftp
echo yourFtpUserName >> temp.ftp
echo yourFtpPassword >> temp.ftp
echo cd yourWebPath/NOAA-reports >> temp.ftp
for /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt') do echo put %%~a >> temp.ftp
ftps -a -s:temp.ftp
del temp.ftp
attrib -R NOAA*.txt
Oh how long ago was it we used to write batch scripts - very nostalgic :lol:
Or use a file sync utility :roll:
It does the trick Mark!
Thanks! 8-)
Larry
"But it's a DRY Heat!"

Image
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: windows ftp.exe

Post by n9mfk »

Larry,
did you test that with ftps.exe if so were did you find it
thanks
Last edited by n9mfk on Thu 01 Sep 2011 2:42 am, edited 1 time in total.
neondesertweather
Posts: 14
Joined: Tue 11 May 2010 5:49 pm
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Las Vegas, Nevada USA
Contact:

Re: windows ftp.exe

Post by neondesertweather »

n9mfk wrote:Larry,
did you test that wit ftps.exe if so were did you find it
thanks
Yes it was with ftps. You can download it here:
http://www.ipswitchft.com/products/move ... index.aspx
Larry
"But it's a DRY Heat!"

Image
n9mfk
Posts: 845
Joined: Sun 10 May 2009 8:52 pm
Weather Station: davis vp2 Serial datalogger
Operating System: Windows 7 64-bit
Location: Springfield, IL

Re: windows ftp.exe

Post by n9mfk »

here are some changes this will run out side of the reports folder

Code: Select all

@echo off

pushd "c:\Cumulus\Reports"

echo open yourwebsite.com > temp.ftp
echo yourFtpUserName >> temp.ftp
echo yourFtpPassword >> temp.ftp
echo cd yourWebPath/NOAA-reports >> temp.ftp
for /f "tokens=* delims= " %%a in ('dir /b/a:A NOAA*.txt') do echo put %%~a >> temp.ftp
echo cd .. >> temp.ftp
echo cd data >> temp.ftp
echo put c:\cumulus\data\dayfile.txt >> temp.ftp
ftps -a -s:temp.ftp
del temp.ftp
attrib -R NOAA*.txt

popd

TIMEOUT /T 30


Beau
Post Reply