October 23, 2009 at 1:07 pm
Hi all, I have to copy specific files from one folder to another. The name is in plain text in the database and the path can be constructed from other pieces of data. If I were to make a table containing the source and destination what sql tool would I use to perform the copy. Thank you and warm regards.
October 23, 2009 at 5:20 pm
You can either write a batch script to get the required information from the database via a command line, or if you want to do from within the database you can use master.dbo.xp_cmdshell.
Note: This External Stored Procedure is disabled on many databases as it can be considered a security risk.
James Leeper
Database Administrator
WDS Global - Americas Region
James Leeper
Database Administrator
WDS Global - Americas Region
October 23, 2009 at 5:24 pm
I would recommend VBSCript to do this. The FileSystemObject can perform file manipulation and the ADO objects can connect to SQL Server.
October 23, 2009 at 8:17 pm
Depending on your level of comfort with the DOS gods, I'd recommend either xp_CmdShell or SSIS. If you were to post a wee bit more information using the techinques found in the article at the first link in my signature line below, I'm betting a bunch of folks could give you working suggestions.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply