Page 3 of 3

Re: Local Web Server

Posted: Wed 18 Dec 2013 6:47 am
by firemanak
okay so http://www.home.gci.net/~firemanak/weather is a local server we got with our internet, and phone, etc...
This is where my weather station page is, that is always updated
This server doesn't allow PHP scripts so can't do my banner on here on that server.

But I do have a family website http://www.alaskaroofs.com/
that does allow PHP scripts. But instead of me having to go back to weather underground, cwop, WOW, Weatherbug...

I was trying to figure a way to upload the file (c:/cumulus/realtime.txt) to that last server.
So the location would be alaskaroofs.com/weather/realtime.txt

Does this help?

Right now, I have WS_FTP scheduler, uploading the realtime.txt file every 2 mins.

Re: Local Web Server

Posted: Wed 18 Dec 2013 8:34 am
by BCJKiwi
Still not clear.
I presume everything is working OK on http://www.home.gci.net/~firemanak/weather - i.e. Cumulus is uploading to that website OK and everything that can work on there is working?
You say this is a 'local' server.
Does 'local' mean it is running in your house on your side of the internet connection or is it running at the internet service provider?

Similarly, is http://www.alaskaroofs.com/ hosted somewhere on the internet or is it in your premises on your side of the internet connection?
From your earlier post I figure this is the site that is on GoDaddy, so that is external and will require FTP.
Is this the site you have WsFTP sending realtime.txt to?

If you are sending one file to GoDaddy, then you should be able to do whatever you are doing for that file, for any other files you need.
Since I can't get to the firemanak site, I can't tell where that is.

If a site (i.e. the webserver) is inside the internet connection, on your local area network then you can copy and won't require ftp at all.
If however it is hosted externally, then you will need FTP.

If you have both external, use Cumulus to send to one and WsFTP to send to the other.

Re: Local Web Server

Posted: Thu 06 Feb 2014 7:03 pm
by n9mfk
Hi ,

using this as a example
C:\Cumulus\localfiles>echo F|copy c:\cumulus\data\dayfile.txt public_html\weather\data\dayfile.new /Y

I tried

Code: Select all

cumulus\web>echo F|copy c:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
you get

Code: Select all


C:\Cumulus\ftp>tagtime

C:\Cumulus\ftp>C:\Cumulus\web F 1>echo  | copy c:\cumulus\web\CUtags.txttmp C:\x
ampp\htdocs\weather\CUtags.php /Y
'C:\Cumulus\web' is not recognized as an internal or external command,
operable program or batch file.

C:\Cumulus\ftp>
so i do not understand echo F|copy
beau

Re: Local Web Server

Posted: Thu 06 Feb 2014 8:29 pm
by BCJKiwi
We need ALL the information, not just snippets to sort this out.
(we have had this discussion repeatedly - if you want help then you need to help us to help you!). I have no idea if the snippets you have posted are at the command line or in a batch(cmd) file?

The point of the echo F| was explained in detail in an earlier post.
echo F| 'pipes' the F to answer the prompt that may otherwise appear (and stall the batch file) which asks if the copy is for a file or a directory.
The errors you are getting have nothing to do with the echo F| but the dos commands being issued. You have not actually used echo F| in your example!

Code: Select all

C:\Cumulus\ftp>C:\Cumulus\web F 1>echo  | copy c:\cumulus\web\CUtags.txttmp ....... 
C:\Cumulus\ftp> is the dos prompt. This says that you are already at that location in the directory structure.
what is this??

Code: Select all

C:\Cumulus\web F 1>echo  | ... 
Where does it come from? What is it intended to achieve? It does not look like anything Dos will understand.

So if you want further assistance please provide;
1. A copy of the batch file (all of it not just a line or two!)
2. The name of the source folder structure EXACTLY as it is on your system.
3. The name of the destination folder structure EXACTLY as it is on your system.
4. The name of the source file(s) as seen when in the source folder.
5. The name of the destination file(s) as seen when in the destination folder.

There are plenty of tutorials and help on the internet and the syntax of dos commands is available from the dos prompt.
e.g. More detail than any of us are likely to need available here http://www.robvanderwoude.com/battech.php

Re: Local Web Server

Posted: Thu 06 Feb 2014 9:05 pm
by n9mfk
ok
my setup is this
C:\cumulus main folder
C:\cumulus\ftp were realtime.cmd tagtime.cmd and daily.cmd are
files cumulus make are in C:\cumulus\web
were all files go C:\xampp\htdocs\weather

Here is my tagtime.cmd

Code: Select all

copy C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
copy C:\cumulus\web\cloudbaseCUT.txttmp C:\xampp\htdocs\weather\cloudbaseCU.txt /Y
copy C:\cumulus\web\davcon24T.txttmp C:\xampp\htdocs\weather\davcon24.txt /Y
xcopy  C:\cumulus\web\images C:\xampp\htdocs\weather\images /Y
when i tried

Code: Select all

C:\cumulus\web>echo F|copy C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
or
echo F|copy C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
it crashes the file
Beau

Re: Local Web Server

Posted: Fri 07 Feb 2014 3:11 am
by BCJKiwi
Is that really the ENTIRE tagtime.cmd??

Did you try any / all those lines individually at a dos command prompt while in the C:\cumulus\FTP folder ? - i.e. you were in dos with a prompt which said;
C:\cumulus\FTP>
That should be your starting point - run any new thing you want to try manually first before putting it into a .cmd file. That way you can see if there are any errors and sort them if there are. You can also check that the file has arrived.
The next step is to run the .cmd file from a dos prompt.
You can put ECHO ON at the top and pause between each line so it steps through so you can see what is going on.

If you checked the internet or the link I posted in my last post you would have found all this already - batch files 101.

Code: Select all

copy C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
copy C:\cumulus\web\cloudbaseCUT.txttmp C:\xampp\htdocs\weather\cloudbaseCU.txt /Y
copy C:\cumulus\web\davcon24T.txttmp C:\xampp\htdocs\weather\davcon24.txt /Y
xcopy  C:\cumulus\web\images C:\xampp\htdocs\weather\images /Y
This should be at least;

Code: Select all

xcopy echo F| C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
xcopy echo F| C:\cumulus\web\cloudbaseCUT.txttmp C:\xampp\htdocs\weather\cloudbaseCU.txt /Y
xcopy echo F| C:\cumulus\web\davcon24T.txttmp C:\xampp\htdocs\weather\davcon24.txt /Y
xcopy C:\cumulus\web\images\*.* C:\xampp\htdocs\weather\images\ /Y
Why the echo F| ? as previously explained you are changing the name so you need to 'feed' a response to the "prompt is this a file or a folder?" that you may or may not get, to tell Dos that it is a file.
I would not know if the last line would work or not but I like to know what I'm doing when I come back to it in 6 months time so would always specify what I want to copy - hence the \*.*

or as suggested above and run from a command prompt;

Code: Select all

echo on
xcopy echo F| C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
pause
xcopy echo F| C:\cumulus\web\cloudbaseCUT.txttmp C:\xampp\htdocs\weather\cloudbaseCU.txt /Y
pause
xcopy echo F| C:\cumulus\web\davcon24T.txttmp C:\xampp\htdocs\weather\davcon24.txt /Y
pause
xcopy C:\cumulus\web\images\*.* C:\xampp\htdocs\weather\images\ /Y
pause

Re: Local Web Server

Posted: Fri 07 Feb 2014 5:56 pm
by n9mfk
I tried

Code: Select all

xcopy echo F| C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
at a command prompt and got

Code: Select all


C:\Cumulus\ftp>
C:\Cumulus\ftp>
C:\Cumulus\ftp>xcopy echo F| C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
File not found - echo

C:\Cumulus\ftp>
Beau

Re: Local Web Server

Posted: Fri 07 Feb 2014 8:24 pm
by BCJKiwi
Apologies,

xcopy echo F| C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y
should be;
echo F|xcopy C:\cumulus\web\CUtags.txttmp C:\xampp\htdocs\weather\CUtags.php /Y

Re: Local Web Server

Posted: Sat 08 Feb 2014 1:43 am
by n9mfk
the funny thing about Xcopy is It shows the file that is be copied but not were it going or name
Beau