title: VBScript compilation error: Expected end of statement
body: <p>I am trying to execute a VB script to copy paste the file and rename with current time system is showing error.</p>
  
  <p>Error - Microsoft VBScript compilation error: Expected end of statement</p>
  
  <pre><code>ExecuteInsert
  Sub ExecuteInsert()
      Const DestinationFolder = "D:\Temp\Help\"
      Const SourceFolder = "D:\Temp\"
      Const SourceFile = "DataFile.xlsx"
      dim DestinationFile as String
      DestinationFile = "DataFile_" &amp; Format(Now, "dd_mm_yyyy hh_mm") &amp; ".xlsx"
      Set fso = CreateObject("Scripting.FileSystemObject")
      fso.CopyFile SourceFolder &amp; SourceFile, DestinationFolder, True
      Name DestinationFolder &amp; SourceFile As DestinationFolder &amp; DestinationFile
      Set fso = Nothing
  End Sub
  </code></pre>