title: Rename files on disk with t-sql
body: <p>I am using T-SQL</p>
  
  <p>I have a few excel files located here: <code>C:\MyFiles\</code></p>
  
  <p>I want to remove all the apostrophes in the file names in that directory.</p>
  
  <p>Now to remove apostrophes one would use code like this.</p>
  
  <pre><code>update MyTable
  set FileName= replace(FileName, '''', '')
  </code></pre>
  
  <p>If I had all the file name in the DB it would be easy to do with the code above. But I need to update the file names that are located on disk.</p>
  
  <p>How would I go about doing this with T-SQL?</p>
  
  <p>It must be T-SQL because I need to add it to my existing code in my Stored Procedure.</p>