View Single Post
Old 06-14-2007   #2 (permalink)
Marco Shaw


 
 

Re: Searching large text files

Chris Harris wrote:
> I have very large text files (100MB-500MB+) that I need to process in order
> to extract useful pieces of information. Unfortunately, I can't find an
> efficient way of doing this with powershell as get-content tries to pull the
> entire contents of the file into memory and doesn't seem to store it there
> very efficiently.
>
> While I have 2GB of memory on my machine, I keep getting
> System.OutOfMemoryException errors from get-content. When I look at the
> powershell.exe process in task manager I see it using over 1.5GB of memory.
>
> Is there a more efficient way to do this with Powershell?
>
> Thanks,
> Chris


Can you be more specific about what you are trying to accomplish?
PowerShell may not be the best in this case (until v.Next).

Marco
My System SpecsSystem Spec