title: Remove-Item not working when a file name is provided in a variable
body: <p>I am very curious about this as it took me a while but I couldn't figure it out</p>
  
  <p>First, I ran the following script to get all Zip files in a dir</p>
  
  <pre><code>$entryList = New-Object System.Collections.ArrayList
  
  Get-ChildItem -Path "\\tools-backup.nas\Tools-Backup\FakeS3\Rollback\$serverName" -ErrorAction Stop | sort -Property "LastWriteTime" | ForEach-Object {
      if($_.Name.Contains(".zip")) {
              $entryList.Add($_.Name) | Out-Null
          }
      }
  </code></pre>
  
  <p>it showed as below: </p>
  
  <pre><code>2016-08-30_21-15-17_server-1.1.20558_client-1.1.20518 - Copy - Copy.zip
  2016-08-30_21-15-17_server-1.1.20558_client-1.1.20518 - Copy (2).zip
  2016-08-30_21-15-17_server-1.1.20558_client-1.1.20518 - Copy (3).zip
  2016-08-30_21-15-17_server-1.1.20558_client-1.1.20518 - Copy.zip
  2016-08-30_21-15-17_server-1.1.20558_client-1.1.20518 - Copy (6).zip
  2016-08-30_21-15-17_server-1.1.20558_client-1.1.20518 - Copy - Copy (2).zip
  </code></pre>
  
  <p>Then I tried to delete the first one(2016-08-30_21-15-17_server-1.1.20558_client-1.1.20518 - Copy - Copy.zip) with remove-item like this: </p>
  
  <pre><code>Remove-Item -Path "\\tools-backup.nas\Tools-Backup\FakeS3\Rollback\$serverName\$entryList[0]" -ErrorAction Stop
  
  Remove-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
  At line:1 char:1
  + Remove-Item -Path "\\tools-backup.nas\Tools-Backup\FakeS3\Rollback\$s ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ReadError: (\\toolsbackup....lback\autopatch:String) [Remove-Item], PathTooLongException
  + FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.RemoveItemCommand
  </code></pre>
  
  <p>I got a path too long exception. However, if I put the file name in "Remove-Item" instead of passing it by $entryList[0], it worked</p>
  
  <pre><code>Remove-Item -Path "\\tools-backup.nas\Tools-Backup\FakeS3\Rollback\$serverName\2016-08-30_21-15-17_server-1.1.20558_client-1.1.20518 - Copy (2).zip" -ErrorAction Stop
  </code></pre>