Hi Karthik,

> 
> Is there any way to find the file name of the downloaded file?
> 

Of course there is. Normally wget will transform the last segement of
the url into the filename by changing characters not supported by you
filesystem to similar charakters like "?" ist stored as "%3F" wich is
the URL-Escape sequence.
If you happen to download the output of a cgi-script the headers of the
http-response sometimes contain a line like >>Content-Disposition:
attachment; filename="downloaded.pdf"<< which indicates that wget should
save the contents to downloaded.pdf.

The name really used is on last wget-line.

I guess you're in scripting and i would suggest you append an -O-Option
like "wget -O local/file http://server/url"; as long as you download one
file at a time this just tells wget to save the file as "local/file"
instead of "url", which makes it perfectly predictable.

Hope that helps

Matthias

Reply via email to