|
if exists (select * from dbo.sysobjects where id = object_id(N''[dbo].[p_movefile]'') and OBJECTPROPERTY(id, N''IsProcedure'') = 1) /*--移动服务器上的文件 不借助 xp_cmdshell ,因为这个在大多数时候都被禁用了 --邹建 2004.08(引用请保留此信息)--*/ /*--调用示例 exec p_movefile ''d:\aa.txt'',''c:\'' exec @err=sp_oacreate ''Scripting.FileSystemObject'',@obj out exec @err=sp_oamethod @obj,''MoveFile'',null,@s_file,@d_file exec @err=sp_oadestroy @obj lberr: |