First, the parameters are passed from Vision to the SP. Second, the xp_cmdshell calls the command mkdir and the path is a combination of the directory and the parameters passed from Vision. The problem is that nothing happens when this SP is initiated. I tried to also use the file path "H:/" to test it and that did not work either. Also, I am pretty sure I enabled xp_cmdshell.
Do I have a syntax error?
- Code: Select all
ALTER PROCEDURE [dbo].[usp_createprojectfolders]
@group varchar(20),
@wbs1 varchar(20),
@name varchar(20)
AS
set nocount on
declare @command varchar(1000)
set @command = 'mkdir \\tg-nas02\volsharevision\projects\' + @group + '\' +@wbs1 + '_' +@name
exec master..xp_cmdshell @command , no_output
set nocount off