title: How to create a script to scan for .vsd files and convert to .vsdx files and place them in a destination folder.
body: <p>so like the title said, I have over a thousand .vsd files that I need to convert to .vsdx. However they are scattered in sub folders within a directory. </p>
  
  <p>My question: is it possible to create a script to search a directory for all .vsd files, convert them to .vsdx and place them in a certain folder? </p>
  
  <p>We already have a scrip for converting .vsd files to .vsdx in a single directory, but I'm not sure how to get the rest of the script to do what I need it to do. </p>
  
  <p>Thanks in advance. </p>
  
  <pre><code>$directoryToUpdate='C:\Users\username\Desktop\vsd\'
  $visio= New-Object -com Visio.Application
  foreach($vsdFile in (get-childitem "$directoryToUpdate\*.vsd")){
     write-host "Working on $vsdfile"
     $doc=$visio.Documents.Open($vsdFile.FullName)
     $vsdxFileName=[io.path]::ChangeExtension($vsdFile,'.vsdx')
     $doc.SaveAs($VSDXFileName)
     $doc.close();
  }
  </code></pre>