查询具有特定名称的文件 [英] Query files with specific name
问题描述
大家好,我正在寻找脚本(powershell或vbs),它将查询名称中包含符号"〜"的文件。并显示我最后的修改日期(输出到文件)。
我还需要额外的脚本,这将删除查询的文件,但我想有一个选项来选择应删除的文件修改时间(如超过XX天)。
提前致谢!
看看Get-ChildItem:
http://technet.microsoft.com/ en-us / library / ee176841.aspx
您可以使用它来获取文件列表,然后检查每个文件的LastWriteTime属性。
对于删除,您可以使用Remove-Item:
http://technet.microsoft.com/en-us/library/ee176938.aspx
Hi guys, I`m looking for script (powershell or vbs) which will query files which name contains symbol "~" and which show me last date of modification (output to file).
I need also additional script which will delete the queried files, but I want to have a option to chose files should be deleted based on modification time (like older than XX days).
Thanks in advance!解决方案Hi,
Look at Get-ChildItem:
http://technet.microsoft.com/en-us/library/ee176841.aspx
You can use that to get your list of files and then check the LastWriteTime property of each file.
As for deleting, you can use Remove-Item:
这篇关于查询具有特定名称的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!