title: Foreach loop is not working in PowerShell
body: <p>I'm looking for some help with a foreach loop in Powershell. So the goal is to make new files in PowerShell depending on how many the user requests, so if the user requests to make 4 of the same files it should make four files in the requested folder. I just can't seem to figure out why my foreach loop is not making multiple files. It just makes one file each time. I've attached part of the code.</p>
  
  <pre><code>$FileName = Read-Host "Enter a file name"
  $FilePath = Read-Host "Enter a file path"
  $FileNumber = Read-Host "How many files need to be created?"
  $num = 1
  
  if ($FileName -gt 0) { 
  
      foreach($num in 4) {
      New-Item -Path $FilePath -Name $filepath
      #Write-Host $number $FileNumber
      }
  
  }
  </code></pre>