Hi Sergey,
Thanks and xp_fileexist is exactly what we want, but um, it's knid of the same as xp_cmdshell. In Query analyzer xp_fileexist returns a result set such as:
File Exists File is a Directory Parent Directory Exists
----------- ------------------- -----------------------
1 0 1
(1 row(s) affected)
However maybe I'm dense or something but I don't see the mechanism that allows you to access this result set after it's returned if xp_fileexist is executed in a SP.
What am I missing here??
Bill
>See
Re: Code to do an ADIR() Message #
687244.
>
>>We are trying to use SQL Server xp_cmdshell SP to retireve directory information using a 'DIR xxx.*' type command. This returns a result set in Query Analyzer with an nvarchar(255) column named 'output'. However, we have not been able to find documentation on how to run the command in a SP and force the result set into, say, a temporary table in order to manipulate the data. How would this be done?
>>
>>Thanks,
>>Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.