FtP task and Event Handlers

  • Hi

    I am "Sending files" using the FTP task, but before sending the files, i need to delete the files which are 2 days old on the Ftp machine. i am unable to know the files 2 day old on the remote Ftp machine. I have created a "Event Handler" for the Ftp task.

    Any help in this regard greatly apperciated.

    Thanks

    Ravi

     

  • This was removed by the editor as SPAM

  • Get the directory listing using xp_cmdshell into temp table and delete the files what ever you need..

    I should use DOS based ftp commands to get the directory listing and deleting the files...

    See the following link for commands...

    http://www.techscribe.co.uk/ta/using_ftp.htm

     

    MohammedU
    Microsoft SQL Server MVP

  • Hi

    Could you please throw some more pointers how can i proceed?

    Thanks in advance

    Ravi

  • Have a look at

    http://www.nigelrivett.net/FTP/s_ftp_GetDir.html

    It shows how to do this sort of thing in a stored pocedure.

    Will need access to the disk to create the command files though.


    Cursors never.
    DTS - only when needed and never to control.

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

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