Aug 25, 2003 #1 dawnh44 MIS Jul 16, 2002 16 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 Aug 25, 2003 4 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