【发布时间】:2020-04-21 10:41:41
【问题描述】:
我想要一个 Powershell 脚本,它输出通过递归找到的文件,并在一定时间后修改日期。
目前,它是一个这样的命令;
Get-ChildItem -Recurse | Where-Object { $_.LastWriteTime -ge "01/01/2020 19:57:00" }
但是,输出并不容易处理,因为我得到了这样的结果:
Directory: C:\Test
Mode LastWriteTime Length Name
---- ------------- ------ ----
------ 02/01/2020 15:58 69005864 x.exe
------ 02/01/2020 15:17 144182 y.pptx
------ 02/01/2020 17:34 57452572 z.exe
我希望我的输出改为:
C:\Test\x.exe
C:\Test\y.pptx
C:\Test\z.exe
以及所有其他文件夹中的文件。怎么做呢?
【问题讨论】:
-
您正在寻找
FullName属性。[code] | Select-Object -ExpandProperty FullName
标签: windows powershell file search scripting