View Single Post
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 02-26-2014 , 03:54   Re: File Cleaner (v2.0)
Reply With Quote #3

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.
__________________

Last edited by ddhoward; 02-26-2014 at 03:56.
ddhoward is offline