How can i download any file like zip or pdf or txt or from internert

  • How can i download any file like zip or pdf or txt or from internert

    using TSQL or DTS Package...

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

  • pprajapati (2/14/2008)


    How can i download any file like zip or pdf or txt or from internert

    using 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


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

  • But i requite excat query

    suppose i have to download file from

    http://www.google.com/pwf.pdf

    to directory c:\files\pwf.pdf...

    ..

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

  • pprajapati (2/14/2008)


    But i requite excat query

    suppose i have to download file from

    http://www.google.com/pwf.pdf

    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


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply