Any help is greatly appreciated.
Dim objFSO Dim sSourceFolder Dim sDestFolder Dim sDBFile Dim sDateTimeStamp 'Const OVER_WRITE_FILES = False Set objFSO = CreateObject("Scripting.FileSystemObject") sSourceFolder = "C:\Oceanside\" sBackupFolder = "C:\Files_Found\" sDBFile = "ROWP19-0578 PERMIT","ROWP19-0579 PERMIT" 'Expected end of statement error on this line when I try to search for two files sDBFileExt = "pdf" 'If the backup folder doesn't exist, create it. If Not objFSO.FolderExists(sBackupFolder) Then objFSO.CreateFolder(sBackupFolder) End If 'Copy the file as long as the file can be found If objFSO.FileExists(sSourceFolder & "\" & sDBFile & "." & sDBFileExt) Then objFSO.CopyFile sSourceFolder & "\" & sDBFile & "." & sDBFileExt,_ sBackupFolder & "\" & sDBFile & "." & sDBFileExt MsgBox sSourceFolder & " was copied to " & sBackupFolder End if Set objFSO = Nothing
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
An Experts Exchange subscription includes unlimited access to online courses.Get Started
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE