There is no straightforward command in windows to change the file modify date (Commonly referred to as timestamp) . I have spent significant time searching UNIX touch -t like command equivalent in windows but could not find a command that could achieve this feat.
However there is a a way around through a VBS . This VBScript would let you modify the file timestamp (Modified date ) to the one you give in the parameter. In below example it would be 29-Oct-2015.
So here are the things to change.
Change the last line 1 st argument is the windows folder.
2nd Argument is the file name
3rd Argument is the Date modified desired. One needs to put this code in text file (or create .vbs file) .
Rename the file extension to .vbs . Double click to execute and you are done !!
However there is a a way around through a VBS . This VBScript would let you modify the file timestamp (Modified date ) to the one you give in the parameter. In below example it would be 29-Oct-2015.
Sub ChangeModifiedDate(strFolder, strFile, dteNew) Dim oShell Dim objFolder Set oShell = CreateObject("Shell.Application") Set oFolder = oShell.NameSpace(strFolder) oFolder.Items.Item(strFile).ModifyDate = dteNew End Sub changemodifieddate "D:\myfolder\fmx","new_empl.fmx","29-10-2015"
So here are the things to change.
Change the last line 1 st argument is the windows folder.
2nd Argument is the file name
3rd Argument is the Date modified desired. One needs to put this code in text file (or create .vbs file) .
Rename the file extension to .vbs . Double click to execute and you are done !!
Comments
Post a Comment
Please leave your relevant comments and questions only.