Link to home
Start Free TrialLog in
Avatar of bozer
bozer

asked on

deleting a file with SQL xp_cmdshell

Hello experts,

I am running this one line code on SQL Management Console and it gets hung at 'Executing Query':

exec master..xp_cmdshell 'C:\Test1\Test2\test3.txt'

What is the issue? I login to the SQL Server as the local administrator of that (same) server. Is there something I am missing? Should the folder be shared instead and I use the share name?

Thank you in advance
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bozer
bozer

ASKER

I've requested that this question be deleted for the following reason:

Typo
Avatar of bozer

ASKER

I just realized that after posting but you were even faster to reply Guy, thanks :)