Chai Xiong
Chai Xiong

Reputation: 159

Scrub/clear Last-Modified Date of File

Does anyone know how, with VB.NET, to clear the last-modified date from a file's properties? I looked through a lot of suggestions/examples on Google, but the focus was always on how to change the last-modified date. What I want to do is to scrub (completely clear) the "Date Modified" of any file (this is a somewhat common practice in the legal industry).

Upvotes: 2

Views: 281

Answers (1)

Steve
Steve

Reputation: 5545

A file that has never been modified has a modified date that equals the creation date.

IO.File.SetLastWriteTime(sFile, IO.File.GetCreationTime(sFile))

Upvotes: 2

Related Questions