R8VI
asked on
sql server delete file with script
Hi,
I am using sql server and with bcp i created a file how can i delete that file from sql server with script
please help
Thanks,
R8VI
I am using sql server and with bcp i created a file how can i delete that file from sql server with script
please help
Thanks,
R8VI
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
exec xp_cmdshell 'del C:\path\to\filename.ext'
If not you can try COM and Scripting.FileSystemObject
http://www.kodyaz.com/articles/delete-file-from-sql-server-xp-cmdshell-ole-automation-procedures.aspx