오늘 생성된 파일만 찾기


 

1) 파일 생성 및 수정과 관련된 Property 확인하기
Get-ChildItem -Path c:\down\lab -File -Recurse | Select-Object -Property name, *time | Format-Table -Autsize

2) 오늘 생성된 파일 확인하기
Get-ChildItem -Path c:\down\ -File -Recurse | Where-Object {$_.CreationTime -gt (Get-Date).Date}

3) 7일동안 생성된 파일 확인하기
Get-ChildItem -Path c:\down\ -File -Recurse | Where-Object {$_.CreationTime -gt (Get-Date).AddDays(-7)}

4) 3월1일 이후호 생성된 파일 확인하기
Get-ChildItem -Path c:\down\ -File -Recurse | Where-Object {$_.CreationTime -gt “03/01/2018”}

5) 오늘 생성된 파일만 복사하기
Get-ChildItem -Path c:\down\ -File -Recurse | Where-Object {$_.CreationTime -gt (Get-Date).Date} | Copy-Item -Destination D:\DownloadedFromInternet\

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s