Archived

This topic is now archived and is closed to further replies.

Chuck_B

Need to Find All Aircraft.cfg Files Containing Specific Text

Recommended Posts

One of my new addons requires that I find all aircraft.cfg files in my FS9/Aircraft folder that contains a specific line of text and the Windows XP search engine apparently won't look for text inside an aircraft.cfg file. If someone knows how to make it do this, please let me know what I may be doing wrong.Is there a utility that will find these specific .cfg files for me, and also possibly add 3 specific lines of text automatically to them all in a specified location in the .cfg file?As always, thanks in advance to the group.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I sometimes do things like that using Textpad's "find in files" function. You could set it to search in FS9Aircraft including subfolders, looking in files named specifically "aircraft.cfg" (or *.cfg or aircraft.*) for whatever string it is you're trying to find.Textpad is trialware that nags you to purchase about once every hour but never actually stops working. It has some great features for any kind of code editing, and is a must have if you ever do any manipulation of AI flight plan source files. Available here:http://www.textpad.com/To add the 3 lines of code there's a program from the same company called "WildEdit". It's also trialware but the unregistered version only works on files of 10KB or smaller which rules out the acft.cfg in most cases.What you want to do could likely be done from a DOS prompt or batch file using the "for" and "find" commands but it'd take longer (for me anyway) to research and come up with a working script than it would to manually open each .cfg, check for the string, and add the lines as needed :) .Jim

Share this post


Link to post
Share on other sites

>One of my new addons requires that I find all aircraft.cfg>files in my FS9/Aircraft folder that contains a specific line>of text and [...]Hello!I think here http://www.wingrep.com/download.htm you will find exactly what you need. This tool works perfect like the well known Unix Grep.Mick!

Share this post


Link to post
Share on other sites

Mick, I totally missed your post this morning!Thank you!! I'll give it a try.

Share this post


Link to post
Share on other sites

This is a little known Windows "feature". When you do a text search inside files, it will only search certain file extensions. It is really annoying and bites us at work all the time. Like was suggested, get a good freeware text editor. I use Notepad++, but there are lots of good ones, so just grab whichever one you like best.

Share this post


Link to post
Share on other sites

Craig: Thank you. FYI, I use a freeware search engine at work called Agent Ransack or I use Everything (IT is always in a panic because I refuse to use the 'approved' crap they give me -- the boneheads), but there's no batch change feature to it.

Share this post


Link to post
Share on other sites