Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075922 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 03:48:45 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)DirSearch - Searches for string in directory's files
Pages: [1]
Print
Author Topic: DirSearch - Searches for string in directory's files  (Read 710 times)
cactipus
Level 0
**

Cats are neat. Cacti are too.


View Profile WWW
« on: September 08, 2012, 07:15:58 PM »

I made a small but possibly helpful utility to look for a desired piece of text in a folder full of code.  Once an extension and a phrase to search for has been specified, it looks through through the chosen files' contents and reports the location of the match.

Usage!
DirSearch.exe EXTENSION PHRASE

Example!
DirSearch.exe txt pork

Example Output!
     ***Bacontime.txt***
line 1 - porkporkpork
line 7 - bacon pork is neat
     ***Tennis.txt***
line 23 - I put pork in my mouth before a game once, it was neat.


It has only been created for Windows.
Yes, alternatives have already been created. This one may pose some advantage, who knows? That's half the fun!
It can be downloaded from fuzzlesoft.zzl.org/Files/DirSearch.zip
Logged

Octopodes  > Octopus
Cactipodes > Cactipus
It just makes sense.
Endurion
Level 2
**



View Profile WWW Email
« Reply #1 on: September 08, 2012, 09:39:29 PM »

Erm, doesn't find work for you?
Logged
knightSquared
Level 0
***



View Profile WWW
« Reply #2 on: September 08, 2012, 09:49:56 PM »

Find doesn't really give me much information about the contents of the file.  But other utilities that does something similar are Grep or find-in files in Visual Studio.  Nevertheless, good work on the utility.
Logged

Endurion
Level 2
**



View Profile WWW Email
« Reply #3 on: September 09, 2012, 07:55:29 AM »

find /N "Phrase" [Files]

find /N "#$01" *.asm
Logged
cactipus
Level 0
**

Cats are neat. Cacti are too.


View Profile WWW
« Reply #4 on: September 09, 2012, 12:09:13 PM »

Heh, yes, there are more viable options, but it was my first test in c for a while and it could be helpful.
Logged

Octopodes  > Octopus
Cactipodes > Cactipus
It just makes sense.
Endurion
Level 2
**



View Profile WWW Email
« Reply #5 on: September 10, 2012, 09:38:39 AM »

Yeah, sorry, I didn't mean to downplay your tool Smiley
It just seemed like something that mostly is there already.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic