Link to home
Start Free TrialLog in
Avatar of tonelm54

asked on

Modify file details

I'm trying to build a sub to modify the details of a file (lastModifiedTime, lastWriteTime, lastAccessedTime, createdTime), so I have been trying to build the following:-
	Sub setFileDateTime(strFolder, strFile, lastModifiedTime, lastWriteTime, lastAccessedTime, createdTime)
		Set objShell = CreateObject("Shell.Application")
		Set objFolder = objShell.NameSpace(strFolder)
		Set objFolderItem = objFolder.ParseName(strFile)
		objFolderItem.ModifyDate = lastModifiedTime
	End Sub

Open in new window

However I cannot find out how to access  lastWriteTime, lastAccessedTime, createdTime properties.

Any ideas?
Avatar of Bill Prew
Bill Prew

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial