Показать полную графическую версию : [решено] Фильтр при копировании
red.army@vk
05-03-2015, 11:57
Get-ChildItem -Path \\Backup\1c\ -Recurse -Include "*.dt", "*.zip" | where CreationTime -like *2014* | foreach {Move-Item $_.fullname E:\}
Как исключить папку \\Backup\1c\file ?
Как указать дату меньше допустим 01.02.2015?
Get-ChildItem -Path \\Backup\1c\* -Exclude file | Get-ChildItem -Recurse -Include "*.dt", "*.zip" | where CreationTime -lt (Get-Date "01.02.2015")
Или лучше с Contains:
Get-ChildItem -Path \\Backup\1c -Recurse -Include "*.dt", "*.zip" | where {$_.CreationTime -lt (Get-Date "01.02.2015") -and !$_.FullName.Contains("\\Backup\1c\file")}
Foreigner
05-03-2015, 12:21
red.army@vk,
(Get-ChildItem -Path \\Backup\1c\ -Recurse -Include "*.dt", "*.zip") -notmatch '\\file' | where CreationTime -like *2014* | foreach {Move-Item $_.fullname E:\}
© OSzone.net 2001-2012
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.