View Single Post
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 03-30-2014 , 01:57   Re: File Cleaner (v2.0)
Reply With Quote #4

Quote:
Originally Posted by ddhoward View Post
Perhaps an optional key that specifies the starting location of the desired string. For example, the logs start with a capitol L, right?

Code:
"SM Main Logs"
	{
		"enabled"		"0"
		"filepath"		"logs"
		"days"			"3"
		"string"		"L"
		"start"			"0"
		"case"			"1"
		"extension"		".log"
		"exclude"		"Chat"
	}
You'd just need to compare the return of the StrContains on line 177 with this value here. This will help to ensure that the wrong files aren't accidentally deleted (like if you accidentally made it case insensitive, for example.)

To clarify, if the string that StrContains was looking for is found at the VERY beginning of the bigger string, then the function will return 0. If it begins at the second character, it will return 1. Third character will return 2. Etc.
I may implement this in a future version. However, I will adjust the numbers so first char is 1, second=2, etc., blank=anywhere
ThatOneGuy is offline