[Help] CA File Extension Deleter

Posts 1–9 of 9 · Page 1 of 1
[Help] CA File Extension Deleter
have you guys ever seen that tool for combat arms which finds the extension and deletes it? well i am almost done with mine but all i got to do is just finished the cleaner, which the extension deleter.

i setup checkboxes with the names like:
*.txt
*.jpg
etc.

i know what the code is:
Kill("C:\Nexon\Combat Arms\*.txt")

but i also have a button called "Delete"

what i basically want to do is.. If a checkbox is checked and you press delete it will search in the CA directory and delete the extension.

i also have a checkbox that is called "Check All"
i have set that up making sure it checks all when it is checked and it will deselect all when "Check all" is not checked.

But what i want it to do is if it checks all the checkboxes and you hit the Delete button it deletes every single extension checked
Ok so you havve your checkboxes.

Your delete button would be:
Code:
If CheckBox1.Checked Then ' Thats your checkbox command
On Error Resume Next ' Error proventing function. If there is no text files then the program wont crash
Kill("C:\Nexon\Combat Arms\*.txt")
End If
Do that on the delete button for each of the checkboxes
____________

For the select all checkbox.

Add a checkbox.
Double click it
This would be the code:

Code:
If checkbox(Your checkbox number).checked then
checkbox1.checked = true
checkbox2.checked = true
ect 
ect
else ' if the checkbox isnt ticked then this is what will happen
checkbox1.checked = false
checkbox2.checked = fasle
ect
ect
end if

Thank me if i helped

acid_buRn
knew i was right lol.. ok for the ahnreport, intro move, CAV, Ending banner what are the extensions for that?
Quote Originally Posted by LetItRock View Post
knew i was right lol.. ok for the ahnreport, intro move, CAV, Ending banner what are the extensions for that?
To delete or move?
to delete..
will CA still work if the CAV.exe isnt there?

you have msn or somthing?
Quote Originally Posted by LetItRock View Post
to delete..
will CA still work if the CAV.exe isnt there?

you have msn or somthing?
yh i do.

hacks.acid_buRn@hotmail.com

add me and illhelp u
Well actually, instead of using if checkbox.checked commands which will just take up space.. The most effective command that will take care of everything for you is the following:

Code:
        On Error Resume Next

        For Each chkbx As Control In Controls
            If TypeOf chkbx Is CheckBox Then
                If DirectCast(chkbx, CheckBox).Checked Then
                    Kill(Combat Arms Directory & "\" & chkbx.Text)
                End If
            End If
        Next
This one code will take care of every checked checkbox for you, thus minimizing the work and making your coding more efficient. Now this is assuming your checkbox.text is *.txt, *.jpg, etc..

______

Now the code above won't work with the AhnRpt, CAV, EndingBanner.exe, etc..
A simple DeleteFile command doesn't have the power to delete these files seeing as how they have Read-Only attributes. So you can use the following code:

Code:
        If CheckBox(Your Number).Checked Then
            If My.Computer.FileSystem.FileExists(Combat Arms directory & ("\CAV.exe")) Then
                System.IO.File.SetAttributes(Combat Arms directory & ("\CAV.exe"), IO.FileAttributes.Normal)
                My.Computer.FileSystem.DeleteFile(Combat Arms directory & ("\CAV.exe"))
            End If
        End If
That code will be used for each file you want deleted, just replace the file name with the expected file you want to delete.
well your source if sorta confusing xD
Quote Originally Posted by LetItRock View Post
well your source if sorta confusing xD
Confusing? I wrote it for you... What's so difficult with replacing (Combat Arms Directory) with the actual directory?
Posts 1–9 of 9 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

Talk with us