News:

Welcome to World of Banished!

Main Menu

Search for keywords in .rsc and .srsl files

Started by FlyingDutchman, September 27, 2019, 03:23:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FlyingDutchman

Yes, you may have already guessed, I'm a batch-aholic! Command Prompt batch files, also when compiled, provide you with possibilities Windows itself won't provide.

This executable batch file will help you to find in which files (RSC, SRSL or both) a certain keyword can be found. Copy the file to your Banished Toolkit resource folder. Using the Command Prompt enter:

   findKeyword searchString

where searchString is the phrase or keyword you may be looking for.

This program will search for the given string in the resource folder and all subfolders, but only in .rsc files, .srsl files, or both, which you will be asked for, and will discard any file that can't be regarded as a plain text file. The results of the search are saved in a text file that can be opened with any text editor and displays the filename with path, linenumber and complete line in which the given string occurs. This text file is saved as: searchString.txt where searchString ofcourse is the string you entered at the command line.

Requirements

This executable can be used with Windows 7 and later.

Example

To search for all lines with the SoundEffect keyword, enter

   findKeyword SoundEffect

The results will be save in SoundEffect.txt. The command line parameter is case sensitive.