Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I know if a folder exists
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00962392
Message ID:
01274644
Views:
10
>See sample code below that shows how you can check for directory existence
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.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform