1

i need to change modification time stamp in windows files with vbscrip after copying them. Thanks

4

2 回答 2

9

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"
于 2013-04-25T15:06:46.513 回答
0

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.

于 2013-04-25T15:03:55.050 回答