Hi, i am making a secure file deletion program. It works great, but it is extreamly slow. Any help will be appreciated.
Code:
Private Sub Command1_Click() On Error Resume Next q = "" Dim file As String CD.ShowOpen If CD.FileName = "" Then End file = CD.FileName Open file For Binary As #1 tem = LOF(1) Dim bytarray() As Byte ReDim bytarray(1 To tem) Get 1, 1, bytarray q = "" Form1.Hide For b = 1 To Combo1.Text For i = 1 To tem mrand = Int(Rnd * (250)) bytarray(i) = Chr(mrand) Next i For g = 1 To tem Put 1, g, bytarray(g) Next g Next b Close #1 Kill file MsgBox "Delete is complete", vbOKOnly, "Done!" End End Sub
Comment