Skip to content

Instantly share code, notes, and snippets.

@fornext1119
Created April 23, 2013 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fornext1119/5441435 to your computer and use it in GitHub Desktop.
Save fornext1119/5441435 to your computer and use it in GitHub Desktop.
ファイルの更新日付を変更する
Set fs = CreateObject("Scripting.FileSystemObject")
file = WScript.Arguments(0)
If WScript.Arguments.Count > 1 Then
dt = CDate(WScript.Arguments(1))
Else
dt = Now
End If
With CreateObject("Shell.Application")
With .NameSpace(fs.GetParentFolderName(file))
.Items.Item(fs.GetFilename(file)).ModifyDate = dt
End With
End With
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment