powershell脚本找修改的文件

$sourcedir="D:\workspace"
$targetdir="E:\newf"
$lastdate="2017-05-19" $filelist=dir $sourcedir -recurse *.* | where-object{ $_ -is [System.IO.FileInfo] -and $_.LastWriteTime -gt [datetime]::Parse($lastdate) }
$filelist | ForEach-Object {
$_.FullName
$filedic=$_.DirectoryName
$filedic=$filedic.Replace($sourcedir,$targetdir)
md $filedic
Copy-Item $_.FullName ($filedic+"\"+$_.Name)
}
上一篇:【转】8张图理解Java


下一篇:php:Header