'------------------------------------------------------------------
' デスクトップに日付時刻を「ファイル名」にした
'------------------------------------------------------------------
'-------<デスクトップのパスを MyDesktop に取得>-------
Dim MyDesktop, WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
MyDesktop = WshShell.SpecialFolders("Desktop")
Dim FS
Set FS = CreateObject("Scripting.FileSystemObject")
Dim FileName, newFile, newText
FileName = MyDesktop & "" & Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日" & ".txt"
Set newFile = FS.CreateTextFile(FileName,True)
newText = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日"
newFile.WriteLine(newText)
newFile.Close
' デスクトップに日付時刻を「ファイル名」にした
'------------------------------------------------------------------
'-------<デスクトップのパスを MyDesktop に取得>-------
Dim MyDesktop, WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
MyDesktop = WshShell.SpecialFolders("Desktop")
Dim FS
Set FS = CreateObject("Scripting.FileSystemObject")
Dim FileName, newFile, newText
FileName = MyDesktop & "" & Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日" & ".txt"
Set newFile = FS.CreateTextFile(FileName,True)
newText = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日"
newFile.WriteLine(newText)
newFile.Close