declare @client varchar(25), @outputfilename varchar(30)
SET @client = 'MYCLIENT'
SET @outputfilename = @client + '.txt'
declare @cmd varchar(255)
set @cmd = 'C:\Database\Disease_Registry\Common\ReleaseP4PandDR\TrimSpaces.bat ' + @outputfilename
exec master..xp_cmdshell @cmd
This code is returning "The system cannot find the specified path"..BUT when i extract the @cmd variable and run it from command prompt it works fine. is there a special way of running a batch file from the Xp_cmdshell?
thank you very much for your time in advance.
SET @client = 'MYCLIENT'
SET @outputfilename = @client + '.txt'
declare @cmd varchar(255)
set @cmd = 'C:\Database\Disease_Registry\Common\ReleaseP4PandDR\TrimSpaces.bat ' + @outputfilename
exec master..xp_cmdshell @cmd
This code is returning "The system cannot find the specified path"..BUT when i extract the @cmd variable and run it from command prompt it works fine. is there a special way of running a batch file from the Xp_cmdshell?
thank you very much for your time in advance.