2015. 1. 13. 21:47
VBS - 파일 수정 날짜 쿼리 (매개 변수) Etc.2015. 1. 13. 21:47
Set oArgs = WScript.Arguments
If oArgs.Count = 0 Then
WScript.Echo "Argument was not provided."
WScript.Quit
End If
strFilePath = ""
If oArgs.Count > 1 Then
For i = 0 to oArgs.Count - 1
strFilePath = strFilePath & oArgs(i) & " "
Next
Else
strFilePath = oArgs(0)
End If
Set sFSO = CreateObject("Scripting.FileSystemObject")
Set f = sFSO.GetFile(strFilePath)
FileModifiedDate = cDate(f.DateLastModified)
Set f = NOTHING
Set sFSO = NOTHING
WScript.Echo strFilePath & vbCRLF
WScript.Echo "Modified Date: " & FileModifiedDate