파일이 생성된 시간 변경하기


Get-Item c:\down\index.html
$item = Get-Item c:\down\index.html
$item | Select-Object *
$item.CreationTime

$time=Get-Date
$item.CreationTime = $time.AddMonths(-10)
$item.CreationTime

이렇게 하면 파일 생성 시간이 원래 것보다 10개월 이전으로 변경된다
파일 생성 시간  뿐 아니라 lastAccessTime, lastWriteTime도 변경할 수 있다

 

 

 

 

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