title: How to read file names from harddisk in t-sql
body: <p>I have thousands of photos in my hard-disk. All photo file-names consists of 4 parameter :</p>
  
  <pre><code>'7 digit number ' + '-' + '3 digit number ' + '.gif'
  </code></pre>
  
  <p>for instance : <code>1000091-356.gif</code></p>
  
  <p>I'm wondering how to write a  query in order to use <code>3 digit number</code> of file name as a paramer for updating my  table which primary key match the <code>7 digit number</code> of the file name.</p>
  
  <p>By another word a query which act  like : <code>update myTable set col2 = 356 where col1=1000091</code> for all photos .</p>