Declare @Path varchar(5000) Set @Path='D:\Data\Test.txt' declare @Command varchar(5000) set @Command='echo "Hello World">' + @Path exec master..xp_cmdshell @Command
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)