Link to home
Create AccountLog in
Avatar of ml1n4
ml1n4Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Deleting files from a server file share using an overnight stored procedure

Hello Experts,

I am trying to delete a set of files from a file share using an overnight stored procedure in SQL 2000.  I can delete the files manually from the server using Windows Explorer and the command prompt, but I'm getting 'Access Denied' from the Query Analyser.  Any ideas?

DECLARE @KillString varchar(255)
SET @KillString = 'DEL "F:\Shared Documents\Attachments\1.ico"'
EXEC Master..xp_cmdShell @KillString
SOLUTION
Avatar of smidgie82
smidgie82
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of ml1n4

ASKER

I assumed it was running as the Administrator account, but I don't know, how do you find out?
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.