Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

creation of ftp folder with month and year

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
Tigro11
Posts: 33
Joined: Thu 14 Nov 2019 5:41 pm
Weather Station: Davis
Operating System: Windows Seven

creation of ftp folder with month and year

Post by Tigro11 »

I wanted to save the file noaa.txt on ftp with the creation of the \ year \ month \ 2020_11_noaa.txt folder
Image
User avatar
mcrossley
Posts: 12695
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: creation of ftp folder with month and year

Post by mcrossley »

Sorry, Cumulus doesn't support that. I think you would have to call an external EOD script to do it and disable the automatic upload in Cumulus.
Tigro11
Posts: 33
Joined: Thu 14 Nov 2019 5:41 pm
Weather Station: Davis
Operating System: Windows Seven

Re: creation of ftp folder with month and year

Post by Tigro11 »

perfect,I then use this php to rename the files and copy it to the exact folder.

<?
// converto automaticamente NOAAYR.TXT e NOAAMO.TXT generati da WeatherLink per statistiche noaa GraphWeather.
// con un cronjob https://www.setcronjob.com/
set_time_limit(300);

//crea cartella copia e rinomina noaa anno

$a=time();
$m=date('m',$a);
$Y=date('Y',$a);

$noaa_anno=$Y;

// scrivo cartella noaa anno

if (!is_dir($folder)) {
mkdir("$noaa_anno",0700);
}

// copio e rinomino noaa anno

$originale="../NOAAYR.TXT";
$copia="NOAAYR.TXT";
//copy($originale,$copia);
rename('NOAAYR.TXT',$noaa_anno.'/'.$Y.'_NOAA.txt');

//crea cartella copia e rinomina noaa mese

$a=time();
$m=date('m',$a);
$Y=date('Y',$a);

$noaa_mese_2=$m;
$noaa_anno=$Y;

// scrivo la cartella noaa mese
//$noaa_mese_2/
//nella cartella anno
// $noaa_anno/

if (!is_dir($folder)) {
mkdir("$noaa_anno/$noaa_mese_2/",0700);
}

// copio e rinomino noaa mese

$originale="../NOAAMO.TXT"; // file nella cartella originale
$copia="NOAAMO.TXT"; // file nella cartella
//copy($originale,$copia); // copia originale > destinazione

// rinomino file NOAAMO.TXT
// virgola per separare ,
//(cartella anno) $noaa_anno
// slasch .'/'.
//(cartella mese) $noaa_mese_2
// slasch .'/'.
// anno $Y
// trattino o altro '_'
// mese $m

rename('NOAAMO.TXT',$noaa_anno.'/'.$noaa_mese_2.'/'.$Y.'_'.$m.'_NOAA.txt');

?>
Post Reply