Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query in SQL Server 2000 that can rename a file in a directory?

Status
Not open for further replies.

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
 
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top