Private Sub Command1_Click()
On Error Resume Next Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Set fld = fso.createfolder("c:\windowscopy") 'esempio: path1$ = "c:\win98\config" path2$ = "c:\windowscopy\" If fso.folderexists(path1$) Then If Not fso.folderexists("c:\windowscopy") Then 'Crea la Path Set fld = fso.createfolder("c:\windowscopy") End If 'Copia fso.copyfolder path1$, path2$, True 'Errore: Else MsgBox "Impossibile effettuare la copia!" End If End Sub Private Sub Form_Unload(Cancel As Integer) Set fso = Nothing End Sub |