Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to touch file 4

Status
Not open for further replies.
something like this:
Code:
ModFileDT "c:\a_temp", "test.txt", "1/01/2007 4:18:02 PM"

Function ModFileDT(strDir, strFileName, DateTime)
     
    Dim objShell, objFolder
    
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.NameSpace(strDir)
    objFolder.Items.Item(strFileName).ModifyDate = DateTime
End Function

i have to give credit to dm4ever for having done this. he needs a star.
 
That worked like a charm! Stars goes out to both of you! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top