4
这里创建压缩文件,我用它来创建一个.rar
文件用密码从SQL Server
DECLARE @source VARCHAR(1000),
@destination VARCHAR(1000),
@Command VARCHAR(1000)
SET @source = 'E:\Temp\testRar.txt'
SET @destination = 'E:\Temp\testRar.rar'
SET @Command = '"C:\Program Files\WinRAR\Rar.exe" a -ep1 -pasd^ad ' [email protected]+' '[email protected]
EXEC MASTER..xp_cmdshell @Command
代码,但它集asdad
密码,而不是asd^ad
,^
符号被忽略。为什么?
我得到的结果相同 – tungula 2014-10-11 08:35:22
@tungula你试过把^加倍吗? – Donal 2014-10-11 08:50:31
''“C:\ Program Files \ WinRAR \ Rar.exe”a -ep1 -pasd“^”ad“'? – BartekR 2014-10-11 09:36:34