title: Vbscript msgbox out of file list
body: <p>I’m new to vbs, but I need to make a script that copies files from one folder to another, then reads a hole list of copied files and make a log file with those names. This is where I got it covered. Next thing I need to do is to make some sort of msgbox/IEmsg out of this list. This <code>msgbox</code> should have all of the file names, line under the line, that script just copied.</p>
  
  <p>This is my script:</p>
  
  <pre><code>StrMonth = Month(Date)
   If Len(strMonth) = 1 Then
   strMonth = "0" &amp; strMonth
   End If
   StrDay = Day(Date)
   If Len(strDay) = 1 Then
   strDay = "0" &amp; strDay
   End If
   StrYear = Year(Date)
  
   FolderName = "c:\Rafel" &amp; strDay &amp; "." &amp; strMonth &amp; "." &amp; StrYear
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  SET objFolder = objFSO.CreateFolder(FolderName)
   objFSO.CopyFile "c:\Rafel\files\*.*", FolderName &amp; "\"
  
    Wscript.Sleep 1000
    IF objFSO.FileExists( FolderName &amp; "\database.txt") THEN
      Wscript.Echo "Folder created, files are copied."
    END IF
  
  
  SET objFSO = CreateObject("Scripting.FileSystemObject") 
  FILEFOLDER = FolderName
  SET objFolder = objFSO.GetFolder(FILEFOLDER)
  SET filelist = objFolder.Files
  FILELOG = FolderName &amp; "\file log.log"
  
  FOR EACH objFile IN filelist
          FILENAME = FILENAME &amp; "###" &amp; Now &amp; " File copied" &amp; "###" &amp; vbCrlf &amp;_
                    "    File name:" &amp; objFile.Name &amp; vbCrlf &amp;_
                      "    Create date:" &amp; objFile.DateLastModified &amp; vbCrlf &amp;_
                        "    Size:" &amp; objFile.Size &amp; vbCrlf &amp;_
                          vbCrlf
  NEXT
  SET objFile = objFSO.CreateTextFile(FILELOG)
                objFile.Write vbCrlf
                objFile.Write(FILENAME) 
                objFile.Close
  </code></pre>
  
  <p>As you can see, it works as far as making copies and creating log file with a list of files. But how can I make a one message box with a list of those files? I’ve tried, <code>for each</code> but it just “spam” msgbox for each file.</p>
  
  <p>I'm a noob so pls take that in mind. :)</p>