title: Checking a directory contains files or not - tsql
body: <p>I'm trying to code a mssql job that does something using the files in a specific directory. But I don't know the name of the file / files, they will vary in time.</p>
  
  <p>I've found <code>xp_cmdshell</code> command, but I can not use it because of security reasons</p>
  
  <p>Is there any other way to check directory if it contains txt files or not (and if yes get the names of them) in tsql.</p>
  
  <p>Thanks in advance,</p>