Hi Im trying to use some T-SQL to move some files from one directory to another. Im using xp_cmdshell to call the move command Just like this:
create table #output(line varchar(2000) null)
insert into #output exec master..xp_cmdshell 'move /y "D:\files\*.txt" "D:\oldfiles"'
But the files inst move and the #output table contains this output from the move command
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
Access is denied.
0 file(s) moved.
NULL
The sql server proxy account is mapped to the local administrator If i open a command prompt at enter the move command
move /y "D:\files\*.txt" "D:\oldfiles"
The files are moved perfectly
Its all happening on a sql2005 running on a w2k3 server.
Im logged into the server as local administrator