CREATE TABLE #temp01 ( FileExists int, IsDirectory int, ParentDir int) >INSERT INTO #temp01 EXEC master..xp_fileexist 'C:\Program Files' >SELECT CASE IsDirectory > WHEN 1 Then 'Directory Exists' > ELSE 'Directory doesn''t Exist or it''s a file' END > FROM #temp01 >DROP TABLE #temp01 >Thank you.