Autor Tema: Codigo para eliminar carpetas y su contenido By Ponchale VB6  (Leído 2312 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Ponchale

  • Bit
  • Mensajes: 8
  • Reputación: +0/-7
    • Ver Perfil
Codigo para eliminar carpetas y su contenido By Ponchale VB6
« en: Febrero 09, 2014, 03:09:43 am »
Código: (vb) [Seleccionar]
On Error GoTo errhandler
If MsgBox("Asegúrese de borrar " & Dir1.List(Dir1.ListIndex) & vbLf & _
"y todo su contenido?", vbYesNo + vbQuestion) = vbNo Then
Exit Sub
End If
Dim currdir As String, delDir As String
currdir = CurDir
delDir = Dir1.List(Dir1.ListIndex)
ChDir delDir
On Error Resume Next
Kill "*.*"
On Error GoTo errhandler
ChDir currdir
RmDir Dir1.List(Dir1.ListIndex)
Dir1.Path = drvList.Drive
Dir1.Refresh
Exit Sub
errhandler:

Espero que lo disfruten

fuente:latinsoft.eshost.es