title: Verify the existence of files in a Microsoft Access database
body: <p>I have an access database that has a column full of file names.. Some of these files have been moved or deleted. I basically need to verify the existence of each file (10,000+ files).. Basically I need to:</p>
  
  <ol>
  <li>Loop through the table column (MyFilesNames) &amp; check if the file exists.. </li>
  <li>If the file exists then move the file to a new location (Z:\MyFiles\myfilename.pdf) &amp; update the file name to the new location (Z:\MyFiles\myfilename.pdf)..</li>
  </ol>
  
  <p>NOTE: The file names have many different extensions (.pdf, .jpg, .gif, .docx, .xlsx etc..)</p>
  
  <p><strong>THIS IS MY CURRENT TABLE &amp; FILES</strong></p>
  
  <p>-FILE NAMES STORED IN THE DATABASE:</p>
  
  <pre><code>MyFilesNames:
  Z:\Temp\1.pdf
  Z:\Temp\2.jpg
  Z:\Temp\3.gif
  Z:\Temp\4.pdf 
  Z:\Temp\6.pdf 
  </code></pre>
  
  <p>-ACTUAL FILES STORED ON THE COMPUTER:</p>
  
  <pre><code>Z:\Temp\1.pdf
  Z:\Temp\2.jpg
  Z:\Temp\3.gif
  Z:\Temp\4.pdf
  Z:\Temp\5.pdf
  </code></pre>
  
  <p><strong>THIS IS WHAT I AM TRYING TO ACHIEVE</strong></p>
  
  <p>-FILE NAMES STORED IN THE DATABASE:</p>
  
  <pre><code>MyFilesNames:
  Z:\MyFiles\1.pdf
  Z:\MyFiles\2.jpg
  Z:\MyFiles\3.gif
  Z:\MyFiles\4.pdf 
  Z:\Temp\6.pdf 
  </code></pre>
  
  <p>-ACTUAL FILES STORED ON THE COMPUTER:</p>
  
  <pre><code>Z:\MyFiles\1.pdf
  Z:\MyFiles\2.pdf
  Z:\MyFiles\3.pdf
  Z:\MyFiles\4.pdf
  Z:\Temp\5.pdf
  </code></pre>
  
  <p>Is anyone able to help me achieve this using Access 2007?</p>