Patrick Shaw
SSC Rookie
Points: 45
More actions
November 8, 2005 at 3:15 pm
#169475
Does anyone know if it is possible to rename files or folders that are on an FTP site through an ActiveX script in a DTS package?
Ta.
November 11, 2005 at 8:00 am
This was removed by the editor as SPAM
Calvin Duffy
SSCarpal Tunnel
Points: 4306
November 16, 2005 at 12:22 pm
#604266
No need for ActiveX script. T-SQL will do..........Following renames the backup file "DB1Oldname.BAK" to "DB1Newname.BAK" .
declare @rename varchar(255)
select @rename =
'ren "\\FTPSERVER\D$\SQLSERVER\BACKUP\MYDATABASE\DB1\DB1Oldname.BAK" '
+ 'DB1Newname'
+ '.BAK'
exec master..xp_cmdshell @rename
GO
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply