Note: Text covers an earlier version. |
Exporting Lists to the Internet
The service that exports lists in html format can run a custom script after each export. This can be use to publish live results on the Internet. (See also Publishing Live Results on the Internet) Here is an example of how this can be accomplished using FTP:- Create an empty folder, for example c:\temp\meosexport.
- Copy the script below to send.bat, and put it in the folder.
send.bat
REM Send files to FTP server
date /T >> log.txt
time /T >> log.txt
ftp.exe -v -i -s:command.txt >> log.txt
- The script runs commands from the file command.txt, which you must also create in the same folder. In addition, the transfers are logged in log.txt.
command.txt
open ftp.myserver.net
myusername
mypassword
LITERAL PASV
cd upload/results
mput c:\temp\meosexport\*.htm*
close
bye
- You have to change the commands so that ftp.myserver.net points to your FTP server, myusername is your user name and mypassword is the password. The script will upload all files with extension .htm or .html to the folder upload/results on the server, so you have to change that folder to the correct target directory on your server.
- You can test the script by double clicking send.bat. Put a custom html file in c:\temp\meosexport and check that it was uploaded to the server as intended.
- Configure the service to export results to c:\temp\meosexport\\resultat.html and to run the script c:\temp\meosexport\send.bat.
Hint
- Remember to link to the uploaded files from your website in advance.
- If you intend to export server files, it is enough to start the script from one of the services, provided all services write their files to the same folder.
- You can of course publish the start list live as well, if there are many late changes...
To post a comment, you need to log in.