document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \' Gambas module file
  2.  
  3. Public Sub vaciarDirectorio(ruta As String, Optional patron As String) \'\'Borrar contenido de un directorio dado un patron de borrado
  4.   \'borrado si existe la ruta
  5.  
  6.   Dim file As String
  7.  
  8.   If patron = "" Then patron = "*"
  9.   If Exist(ruta) Then
  10.     For Each File In Dir(ruta & "/", patron)
  11.       Try Kill ruta & "/" & file
  12.     Next
  13.   Endif
  14. Catch
  15.   Message.Error(("Error al intentar borrar el directorio: ") & ruta)
  16.  
  17. End
');