title: Outputing multiple file from a filtered single file
body: <p>Hi I have filtered some log file, and then outtputed the results in a file, "E:\filtered_$now.log" i have reviewed this file and has contents and logs in it, then I want to create multiple files from the filtered file and store them in different folders, but it doesn't work, the files created are empty, can anyone identify my problem?</p>
  
  <pre><code>$now = (get-date -f dd-MM-yyyy_HH-mm-ss).ToString()
  
  (filtering and deleting some fields....)
  
  Out-File "E:\filtered_$now.log" |  #output in a file 
  
  #UPTIME
  Get-Content "E:\filtered_$now.log" |  #use the outputed file to further filtering
  where { $_ -match "_Uptime"} |
  Out-File "E:\uptime\uptime_$now.log" |
  
  #MEMORY
  Get-Content "E:\filtered_$now.log" |
  where { $_ -match "_Memoria"} |
  Out-File "E:\memoria\memory_$now.log" |
  
  #SWAP
  Get-Content "E:\filtered_$now.log" |
  where { $_ -match "_Memoria_Swap"} |
  Out-File "E:\swap\swap_$now.log" 
  </code></pre>
  
  <p>some examples in the filtered file</p>
  
  <pre><code>10:41:41 03/02/2020 name:somemonitor_Uptime targets:some.target state:System\System Up Time=4087333.07102 System\System Up Time=4087333.07102 type:Windows Resources unique:1950544758
  
  10:41:41 03/02/2020 name:somemonitor_Memoria targets:some.target state:86% virtual memory used, 6608MB virtual memory free, 1921.99245 pages/sec metrics:percent used=86primMB free=6608;pages/sec=1921.992449537446;virtual memory used %=86;virtual memory MB free=6608;physical memory used %=n/a;physical memory MB free=n/a type:Memory unique:1950492661
  
  10:41:43 03/02/2020 name:Somemonitor_Memoria_Swap targets:some.target state:3% swap space used, 3829MB swap space free, 0 pages/sec; 69% physical memory used, 9668MB physical memory free metrics:percent used=3primMB free=3829;pages/sec=0.0;swap space used %=3;swap space MB free=3829;physical memory used %=69;physical memory MB free=9668 type:Memory unique:1950647593
  
  
  </code></pre>