[Help] WR Cleaner

Posts 1–13 of 13 · Page 1 of 1
[Help] WR Cleaner
Nearly finished off my first cleaner project, just need a little halp with the file paths.

ⓘ

I have used this following code and it does work but I noticed the file path has to be specific

Code:
If CheckBox1.Checked = True Then
            On Error Resume Next
            Kill("C:\Program Files\GamersFirst\War Rock\data\HShield\*.log")
Is there a command I can use to search for those extensions in my entire warrock folder or hard drive?

These are the main files I want to delete but there will also be .tmp and .dmp files after a game update

ⓘ

Note : Ignore those file paths, my games are installed on a different hard drive

( I will have to add a "clean D drive" option in future releases )
Why don't you add the other warrock folder directories as places to delete the *.log files?
Quote Originally Posted by Lolland View Post
Why don't you add the other warrock folder directories as places to delete the *.log files?
I was after a more generic approach due to the fact that a lot of people install in different directories


GamersFirst Live download: C:\Program Files\GamersFirst\War Rock\data\Hshield\aspinet.log

Normal download and install: C:\Program Files\War Rock\data\Hshield\aspinet.log

64 bit user with G1 live download: C:\Program Files (x86)\GamersFirst\War Rock\data\Hshield\aspinet.log

Custom Install example: D:\Games\WarRock\data\Hshield\aspinet.log

( I suppose I could just add more check boxes for those extra file paths if that's what you mean )
Then why don't you make them set their Warrock folder directory
Quote Originally Posted by Lolland View Post
Then why don't you make them set their Warrock folder directory
Set their directory through my application you mean, example?
Yeah reaper, do a "My.Settings" in project properties for their WR directory and make a folder browser dialog. I.e create a button to locate the folder and add the following

[php]
Dim FBD As New FolderBrowserDialog

FBD.Description = "Browse for your WR directory..."

If FBD.ShowDialog = Windows.Forms.DialogResult.OK Then
My.Settings.WRDirectory = FBD.SelectedPath '(change My.Settings.WRDirectory to whatever you named the setting')
txtDirectory.Text = FBD.SelectedPath 'shows the user their current WR directory in a text box
My.Settings.Save()
My.Settings.Reload()

End If
[/php]


Then add this to your clean button:

[php]

If Not My.Settings.WRDirectory = "" then
'run cleaning'
Else
MsgBox("Please locate your WarRock Directory first!", vbExclamation, "No directory found.")
btnBrowse_click(sender, e) 'assuming the button you added the FolderBrowserDialog code to was called "btnBrowse"'

End If

[/php]
Something like this:
Code:
Private sub TextBox1_Cick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Click
Using dlg As New FolderBrowserDialog
dlg.ShowDialog
TextBox1.Text = dlg.SelectedPath
End Using
End sub
Edit: J-Deezy is a ninja.
Quote Originally Posted by Lolland View Post
J-Deezy is a ninja.
Hehe ninja = me /yea
Thanks for the help guys, I will play with those ideas for a bit..

You must get sick of people making noob applications like this, but we have to start somewhere I guess..
Quote Originally Posted by reaper View Post
Thanks for the help guys, I will play with those ideas for a bit..

You must get sick of people making noob applications like this, but we have to start somewhere I guess..
Haha I made a cleaner when I first started as well, it's a good start as you can learn some pretty useful functions.
Meh it's not that bad, at least it's not a spammer.
Make it search the path threw the registry, atleast try .

I'll write something up for you in a few.
This is another thread to learn from , I was wondering a very similar thing so I
Must thank you guy also
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us