document write from txt file into page???
Posted: Mon 06 Oct 2014 4:45 am
I've been playing around with this, i echo the time into a text file and add to document.write to put it into the site.
It's a little messy what i'm doing, so i'm trying to fix it up a little...
So to explain, my camera switches on and echos the time to lapseon.txt using the CMD below
(manually having to add the AM/PM stamp)
this outputs like this in the text file
On the web site i add this
Now i can't find a simple command to output time with AM/PM but I found a powershell method that does it, but only the time to file.
which gives 2:25 PM (as an example)
Does anyone have a method to add the contains of a txt file into website????
It's a little messy what i'm doing, so i'm trying to fix it up a little...
So to explain, my camera switches on and echos the time to lapseon.txt using the CMD below
Code: Select all
if %Hour%==0 set "Hour=12"
set "Allm=%Hour%.%Min%"
echo document.write('%Allm% AM');> lapseon.txtthis outputs like this in the text file
Code: Select all
document.write('8.20 AM');Code: Select all
<script type="text/javascript" src="lapseon.txt"></script></abbr></td>Code: Select all
$a.ToShortTimeString() > C:\Cumulus\lapseon.txtDoes anyone have a method to add the contains of a txt file into website????