1. Internetty thingies.

Two questions, the first of which does not relate to the title: (it's late)

How do you retrieve a file from a remote location?

1) I need to check the existence of a file on a different computer.
Can I set the path (for exw) as \\(name of comp)\c\directory, like appears 
in the win explorer window?



2) I wish to write a routine, that, given a sequence of strings containing 
url's, it will download each url's file into a given directory. It doesn't 
need to search the files' contents for dependant files, just the file 
itself. Any ideas?


Cheers
++++++++++++
Mr Trick

new topic     » topic index » view message » categorize

2. Re: Internetty thingies.

--Message-Boundary-12828
Content-description: Mail message body

On 9 Apr 2002, at 23:40, mistertrik at hotmail.com wrote:

<snip>

> 2) I wish to write a routine, that, given a sequence of strings containing
> url's, it will download each url's file into a given directory. It doesn't
> need
> to search the files' contents for dependant files, just the file itself. Any
> ideas?

Yes, again, to be easy use webshepard or asynchttp, just loop thru the url 
list. I do this every hour using mirc and tcp4u. Once a week i use a program i 
wrote for EInetLib_full.ew, just because i am too lazy to change it to tcp4u or 
asynchttp. The attached file is quick and dirty, but it's been running for a 
year without problems. It also munges the file, makes a filename, checks for 
duplicate saved files, etc.. It does not make a new directory however, that 
was usually done a week before in the mirc program as a tag for me,, 
webshepard makes new directories while it's running. My program also does 
not fetch any urls or src= tags in the webpages, it fetches only the url you 
specify. If you want that, add the new urls to the bottom of the readlist and 
just keep on running. And don't take this program as a example of good 
coding style!

Beware that some webservers know if you are repeatedly connecting to 
them, and they might not like it, and deny access to your whole isp.

Kat,
hoping this gets thru.

--Message-Boundary-12828
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  mine abcnews2.exw
     Date:  9 Apr 2002, 12:18
     Size:  16264 bytes.
     Type:  Unknown

--Message-Boundary-12828
Content-type: Application/Octet-stream; name="mine abcnews2.exw"; type=Unknown
Content-disposition: attachment; filename="mine abcnews2.exw"

new topic     » goto parent     » topic index » view message » categorize

3. Re: Internetty thingies.

Hello "Mr. T" smile

At 23:40 09/04/02 +1000, you wrote:
>
>Two questions, the first of which does not relate to the title: (it's late)
>
>How do you retrieve a file from a remote location?
>
>1) I need to check the existence of a file on a different computer.
>Can I set the path (for exw) as \\(name of comp)\c\directory, like appears 
>in the win explorer window?

Why not work out which drive letter has been mapped to \\(name of
comp)\c\directory and then try opening the file (e.g.
"I:\sharedstuff\filename") and if the file open is ok then assume the file
exists?  YMMV

>2) I wish to write a routine, that, given a sequence of strings containing 
>url's, it will download each url's file into a given directory. It doesn't 
>need to search the files' contents for dependant files, just the file 
>itself. Any ideas?

Two options I can suggest. First is to use one of several TCP based
libraries on the contributions page.

Second is to download the GRABURL.EXE utility (assuming your running
Windows) from:

  http://www.kiraly.com/software/utilities/graburl/

and then call this from "system" calls in EU which save the output to a
file and you can then open, read and inspect the contents of this output file.

>Cheers
>++++++++++++
>Mr Trick

Likewise,

Andy Cranston.

>
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu