Reputation: 31
i need to change modification time stamp in windows files with vbscrip after copying them. Thanks
Upvotes: 1
Views: 9317
Reputation: 1014
You can do it by setting the FolderItem.ModifyDate property. Everything is described here. Sample code:
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.NameSpace("C:\Scripts")
Set objFolderItem = objFolder.ParseName("File.jpg")
objFolderItem.ModifyDate = "01/01/2008 8:00:00 AM"
Upvotes: 9
Reputation: 38745
According to the the docs
DateLastModified
Property Returns the date and time that the specified file or folder was last modified. Read-only.
the property is read-only.
Upvotes: -1