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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying a file 1

Status
Not open for further replies.

LonnieJohnson

Programmer
Apr 16, 2001
2,628
0
0
US
Can I copy a file on a network directory in SQL Server? I want to include it in a stored procedure.

Let me know.



ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
What type of file ? You can use DTS to import text, csv ... type files directly into an SQL database
 
Actually I was wanting it to be sort of a trigger type thing where it would copy a file from C drive to H drive.

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
both drives on the sql server? try this

xp_cmdshell 'copy c:\yourfile f:\yourfile'

Matt

Brighton, UK
 
That's what I'm looking for!!!

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top