【发布时间】:2012-11-23 09:28:24
【问题描述】:
我在服务器上有一个目录,其中包含 250 万个文件。
我需要对这些文件做点什么。但是,当我尝试创建一个表示这些文件的对象时,我遇到了内存限制。 (这是一台 32 位机器。)
PS D:\> $files=dir LotsOfFiles
Get-ChildItem : Exception of type 'System.OutOfMemoryException' was thrown.
有什么办法可以解决这个问题,比如创建一个类来表示存储较少属性的文件(我只需要 name 和 lastwritedate)?
【问题讨论】:
标签: powershell windows-server-2003