Aug 25, 2003 #1 dawnh44 MIS Joined Jul 16, 2002 Messages 16 Location US Can anyone please tell me if there is a way to rename a file in a directory using a query? Thank you in advance, Dawn
Can anyone please tell me if there is a way to rename a file in a directory using a query? Thank you in advance, Dawn
Aug 25, 2003 #2 sbphelps MIS Joined Aug 25, 2003 Messages 4 Location US set @command = 'rename ' + @rpt_path_name + ' ' + @new_name exec master..xp_cmdshell @command, no_output /* where @rpt_path_name is the path (drive and directories) and @new_name is... well, the new file name. sbphelps Upvote 0 Downvote
set @command = 'rename ' + @rpt_path_name + ' ' + @new_name exec master..xp_cmdshell @command, no_output /* where @rpt_path_name is the path (drive and directories) and @new_name is... well, the new file name. sbphelps