Ooops
November 28, 2020, 11:21:17 AM

Author Topic: [bb] databomb by cipherdude9 [ 1+ years ago ]  (Read 537 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] databomb by cipherdude9 [ 1+ years ago ]
« on: June 29, 2017, 12:28:42 AM »
Title : databomb
Author : cipherdude9
Posted : 1+ years ago

Description : use to erase folders

Code :
Code: BlitzBasic
  1. .start
  2. ; Define what folder to start with ...
  3. folder$ = Input$("file to delete:")
  4.  
  5. ; Open up the directory, and assign the handle to myDir
  6. myDir=ReadDir(folder$)
  7.  
  8. ; Let's loop forever until we run out of files/folders to delete!
  9. Repeat
  10. ; Assign the next entry in the folder to file$
  11. file$=NextFile$(myDir)
  12.  
  13. ; If there isn't another one, let's exit this loop
  14. If file$="" Then Exit
  15.  
  16. ; Use FileType to determine if it is a folder (value 1) or a file and print results
  17. If FileType(folder$+""+file$) = 1 Then
  18. Print "File: " + file$ + " deleted"
  19. DeleteFile folder$+""+file$
  20. If FileType(folder$+""+file$) = 0 Then Print "deletion of file: " + file$ + " confirmed"
  21. End If
  22.  
  23. Forever
  24.  
  25. ; Properly delete the open folder
  26. DeleteDir folder$
  27.  
  28. ;done!
  29. Print "Done deleteing files"
  30. Goto start


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal