December 29, 2006 at 11:02 am
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
January 1, 2007 at 8:00 am
This was removed by the editor as SPAM
January 1, 2007 at 1:16 pm
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
January 2, 2007 at 10:31 am
Hi
Could you please throw some more pointers how can i proceed?
Thanks in advance
Ravi
January 3, 2007 at 2:17 am
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