title: Am I coding this powershell correctly? Because it does not do what I intended
body: <p>Need to find out the document set name from a field name called "Region". I need to set the doc set name to be whatever Region is (NW, SW, NE, SE, etc.) and move files from root of the document library to it's respected doc set. I dont mind hard coding the site or web url and doc lib url. I am geting this error:</p>
  
  <p>Missing expression after ','. At C:\PS\MoveFiles.ps1:13 char:59 + $list.Items.MoveTo($destinationFolderUrl + $file.Name, &lt;&lt;&lt;&lt; true); + CategoryInfo : ParserError: (,:String) [], ParseException + FullyQualifiedErrorId : MissingExpressionAfterToken </p>
  
  <pre><code>#Setup default variables
  $webUrl = Get-SPWeb -Identity "http://CiscoIntranet/sites/VOIP"
  $list = $webUrl.GetList("http://CiscoIntranet/sites/VOIP/ForwardTech")
  [System.Reflection.Assembly]::LoadWithPartialName(”Microsoft.SharePoint”) 
  
  function ProcessMove {
     param($folderUrl)
     $folder = $web.GetFolder($folderUrl)
          foreach ($file in $folder.Files)
              {   
                  $docset=$($file.Region);
                  $destinationFolderUrl = "http://CiscoIntranet/sites/VOIP/ForwardTech/" + $docset;
                  $list.Items.MoveTo($destinationFolderUrl + $file.Name, true);
                  $webUrl.Update();
              }
  }
  </code></pre>