title: How do I check if a directory exists using SQL Server?
body: <p>I know this command will create a directory:</p>
  
  <pre><code>EXEC master.sys.xp_create_subdir 'C:\testing\'
  </code></pre>
  
  <p>But how do I check whether 'C:\testing\' exists?</p>
  
  <pre><code>IF EXISTS(...
  </code></pre>