Created
April 23, 2013 07:10
-
-
Save fornext1119/5441435 to your computer and use it in GitHub Desktop.
ファイルの更新日付を変更する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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