FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


download a text-file daily





rvec
I want to get a text file from a webpage(use www.example.com/text.txt for now), and I want to do this every day at a set time. The OS is windows (xp and vista). The file has to be written to C:/program files/program/file.txt and it should overwrite the already existing file.

My idea was to make a batch file and make that execute every day with taskplanner. But because I can't write batchfiles harder than moving or deleting files I need some help.

Other ideas are always welcome, but the windows system doesn't have any special software installed besides everything already supplied with windows (standard install) so PHP isn't an option.

BTW if anyone wants frih$ for it, just tell me.
MrBlueSky
If you download curl (win32, win64 ~300kb), you can use this in a .bat file:

Code:

echo off
c:/your/curl/directory/curl -s -o "C:/program files/program/file.txt" hxxp://www.example.com/text.txt


More info on curl: http://curl.haxx.se/

Or do you want a solution for which you don't have to install a new program? I don't know it that's possible on Windows.
rvec
i'd rather not install anything. Maybe supply something like curl with the script, but I'd like to keep it as small as possible.

If it isn't possible I could as well install PHP and use PHP (I know that Razz).
MrBlueSky
Hmm. It is possible to automate ftp from DOS, but I guess the file isn't also available through ftp?

Otherwise I wouldn't know how to do this.
rvec
I could make it available over FTP, but I'd rather install curl or wget then.
Related topics
users online, using php and text file
Visual Basic Tutorial - File I/O in VB: Text Files
styling text string read from plain text file
download doc file .
Can't download pdf file
Reading from text file into Flash
Deleting certain lines from text file
HELP, reading text file from USB drive in visual basic
Download a file from remote server!
how to add a text file in mp3 data using java ?
English Dictionary in text file or sql database
Perl how to encrypt your text file contents with Perl
edit option not available for a text file
want to delete first 5 lines in a text file
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.