February 14, 2008 at 3:03 am
How can i download any file like zip or pdf or txt or from internert
using TSQL or DTS Package...
February 14, 2008 at 4:13 am
pprajapati (2/14/2008)
How can i download any file like zip or pdf or txt or from internertusing TSQL or DTS Package...
In T-SQL you could use xp_cmdshell to execute a command to retrieve the file. In DTS you could use an FTP task to retrieve a file whose name is known.
Regards,
Andras
February 14, 2008 at 5:38 am
But i requite excat query
suppose i have to download file from
to directory c:\files\pwf.pdf...
..
February 14, 2008 at 6:48 am
pprajapati (2/14/2008)
But i requite excat querysuppose i have to download file from
to directory c:\files\pwf.pdf...
..
You could use the ftp provided with Windows, in this case create a file foo.ftp with the contents :
binary
get pwf.pdf pwf.pdf
bye
the in SQL Server:
xp_cmdshell 'ftp -s:foo.ftp -A http://www.google.com'
Alternatively install wget for windows (http://pages.interlog.com/~tcharron/wgetwin.html)
and the you could just execute in T-SQL:
xp_cmdshell 'wget ftp://www.google.com/pwf.pdf'
or it can get things via http too, just use the right URL.
Regards,
Andras
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply