I have a macro to move files from C:Journal Templates to C:old JNLS
However when activating the macro, it comes up with a message”file already exists” and the following code is highlighted – FSO.moveFile Source:=FromPath & FileExt, Destination:=ToPath . All I want to do is to move the files in folder “C:Journal Templates” to”C:old JNLS
Your assistance in resolving this is most appreciated
Sub Move_JNL_Folder() Dim FSO As Object Dim FromPath As String Dim ToPath As String Dim FileExt As String FromPath = “C:Journal Templates” ToPath = “C:old JNLS” FileExt = “*.*” If Right(FromPath, 1) “” Then FromPath = FromPath & “” End If Set FSO = CreateObject(“scripting.filesystemobject”) If FSO.FolderExists(FromPath) = False Then MsgBox FromPath & ” doesn’t exist” Exit Sub End If If FSO.FolderExists(ToPath) = False Then MsgBox ToPath & ” doesn’t exist” Exit Sub End If FSO.moveFile Source:=FromPath & FileExt, Destination:=ToPath MsgBox “You can find the files from ” & FromPath & ” in ” & ToPath End Sub
http://www.mrexcel.com/forum/excel-questions/720170-macro-delete-items-folder.html