Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas module file
- Public Sub vaciarDirectorio(ruta As String, Optional patron As String) ''Borrar contenido de un directorio dado un patron de borrado
- 'borrado si existe la ruta
- Dim file As String
- If patron = "" Then patron = "*"
- If Exist(ruta) Then
- For Each File In Dir(ruta & "/", patron)
- Try Kill ruta & "/" & file
- Next
- Endif
- Catch
- Message.Error(("Error al intentar borrar el directorio: ") & ruta)
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement