Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Function and SP to find if file/directory exists

By Simon Sabin,

This function and stored procedure can be used to easily identify if a file, directory or parent directory exist.
It wraps the functionality of xp_fileExist but gives easy access to the directory and parent directory exist values.

To use it the function pass in the file or path and either 'IsFile', 'IsDir' or 'HasParentDir' it will return 1 if true.

Total article views: 2697 | Views in the last 30 days: 4
 
Related Articles
FORUM

Shared Directory

Shared Directory

FORUM

"function"

"function"

FORUM

Active Directory

Adding active directory groups

FORUM

Manipulating Integer8 (Active Directory)

Querying Active Directory via a link server and ADsDSOObject

FORUM

Error accessing Active Directory form code

Error accessing Active Directory form code

Tags
 
Contribute