
April 29th, 2008, 01:37 PM
|
|
Registered User
|
|
Join Date: Apr 2008
Posts: 1
Time spent in forums: 2 m 15 sec
Reputation Power: 0
|
|
|
Editing Windows File Properties with VBS
I am trying to make a script to find files with a certain DateLastModified property and then change that property to another date. I am having issues with the scripting to actually change the property. Below is the script I am running to test. I can pull the property but I cannot seem to change it. I have only found one resource that says this can be done but when I attempt it the way they say it errors out. If anyone can be of any assistance I would be grateful.
Thanks,
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("C:\Documents and Settings\clausenk\My Documents\test.txt")
Wscript.Echo "Date Modified: " & objFile.DateLastModified
obj.FileDateLastModified [ = "04292008220000"]
Wscript.Echo "Date Modified: " & objFile.DateLastModified
|