FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Search in PRG-files
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Search in PRG-files
Posted: Thu Apr 12, 2007 01:40 PM

Hello,

I have a problem that is not really a FW one but related to PRG-files.
If I want to search in Windows XP to files that containing a text, windows can’t find the string in PRG-files.
If I look for example to all the files containing the string ‘Function’, windows only find it files that doesn’t have extension PRG. If I rename the program-file to ex. .TXT, the sting is found.
First I was thinking that there was a problem with my PC, but on my new one I have the same problem. Does anyone have the same problem?

It was working in Windows 2000, but since I use XP-Pro, it doesn’t work anymore.

Thanks,
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Search in PRG-files
Posted: Thu Apr 12, 2007 02:13 PM
Try to register PRG extension (ie. double click on a PRG file from Explorer then select a program to always open it).

Or try my FileFind:

http://www.emagsoftware.it/Ff101.zip

EMG
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Search in PRG-files
Posted: Thu Apr 12, 2007 05:03 PM

Marc,

As Enrico mentioned, PRG files are not registered as searchable text files, so you have to do it manually. However, this does not solve the problem that Windows search (except for Vista), does not maintain a search index so each time you start a search the entire disk must be searched while you wait.

I have been using an indexed search engine for a couple of years now. It runs when the CPU is idle and maintains an index of all searchable files (including PDFs, emails, addresses, music, photos, etc.). So, when you do a search it finds the files as fast as you can type the search word. You can then list the files by folder or date. Nice.

I highly recommend this program. And it is free!

Copernic Desktop Search 2.0
wwww.copernic.com

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Search in PRG-files
Posted: Thu Apr 12, 2007 05:27 PM

Enrico,

The PRG-files where already registered, but it didn't work. So I registered it again without result. The stanges thing is that he find it in .C files, and those files aren't registered.

How can I search in files with your FileFind-utility?

James,
Thanks for the tip. I will try it.

Best regards?
Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Search in PRG-files
Posted: Thu Apr 12, 2007 06:04 PM

I just found in the Microsoft knowledge-base that the search only look in the files of type: :(

.asm
.c
.cpp
.cxx
.def
.h
.hpp
.hxx
.idl
.inc
.js
.log
.pl
.rc
.rtf
.url
.xml
.xsl
.css
.hta
.htt
.386
.aifc
.aiff
.asx
.au
.AudioCD
.bkf
.bmp
.cda
.cpl
.cur
.DeskLink
.dib
.drv
.dvd
.emf
.fnd
.folder
.gz
.ivf
.jfif
.jpe
.jpeg
.latex
.m1v
.m3u
.MAPIMail
.mid
.midi
.mp2
.mp2v
.mpa
.mpe
.mpeg
.mpg
.mpv2
.mydocs
.png
.rle
.rmi
.sit
.snd
.tgz
.vxd
.wax
.wm
.wma
.wmp
.wmv
.wmx
.wmz
.wsz
.wvx
.xbm
.ZFSendToTarget

Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Search in PRG-files
Posted: Thu Apr 12, 2007 09:10 PM
Marc Vanzegbroeck wrote:How can I search in files with your FileFind-utility?


As an example:

ff c:\mydir\*.prg report

List all *.prg in c:\mydir and subdir containing the string REPORT. Then you can open each files and automatically jump from one occurrence to the other.

You can also specify the parameters after the utility is run. Press F1 for a list of commands.

If you need of an english version just let me know.

EMG
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Search in PRG-files
Posted: Thu Apr 12, 2007 09:24 PM

Thanks,

It's working very nice.
An Englisch version would be nice. Is there a possibility to open the files with the default program (editor) after doubleclicking the file?

Marc

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Search in PRG-files
Posted: Thu Apr 12, 2007 09:29 PM
Marc Vanzegbroeck wrote:An Englisch version would be nice.


Ok, I will prepare it.

Marc Vanzegbroeck wrote:Is there a possibility to open the files with the default program (editor) after doubleclicking the file?


Yes, just press F11 (look at the help F1).

EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Search in PRG-files
Posted: Thu Apr 12, 2007 09:40 PM

Oh, and if you want the source code (it is pure C + Win32 API) just let me know.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Search in PRG-files
Posted: Thu Apr 12, 2007 11:28 PM

Marc,

We have been using "Total Commander" for years (based on the old MsDos Norton Commander). All our products have been developed using it.

We can't do any professional development without it. It greatly increases your productivity and it has all kind of search options, etc.

There is a non limited shareware version, its worth to try it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Search in PRG-files
Posted: Fri Apr 13, 2007 01:05 AM

None of the other solutions are as fast as Copernic. I just did a search and found 3 files out of the over 350,000 files on my hard disk, in less than a second.

Indexed searching is the only way to go.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Search in PRG-files
Posted: Fri Apr 13, 2007 07:04 AM

I wonder how an index (or at least not a huge index) can keep track of all the text contained inside all the files. Anyway, I much prefer to use my own tools as I can add whatever feature I could need.

EMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Search in PRG-files
Posted: Fri Apr 13, 2007 01:43 PM

Enrico,

>I wonder how an index (or at least not a huge index) can keep track of all the text contained inside all the files. Anyway, I much prefer to use my own tools as I can add whatever feature I could need.

Well, of course, although there are 350,000 files on my disk, only a fraction of them are indexed.

Enrico, as I expect you know, I am a big skeptic. I don't find much software that impresses me, but Copernic's Desktop Search is one of those that does. I encourge you to try it before you dismiss it as not useful. Since it is free, you only have a little of your time to loose and you might really like it.

And you could still use your own tools for anything the Copernic doesn't do.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 86
Joined: Fri Oct 07, 2005 07:59 AM
A BAT for finding text in Prgs.
Posted: Fri Apr 20, 2007 02:41 PM

REM busca.bat
Ej. Busca BtnAceptar

@echo off

if a%1a==aa goto error:

if exist find.txt del find.txt
echo Buscando ocurrencias de la palabra "%1"
echo Espere por favor
if a%2a==aa goto Todo:
for %%i in ( %2 ) do find /n /i "%1" %%i >>find.txt
goto cont:
:Todo
for %%i in ( *.PRG ) do find /n /i "%1" %%i >>find.txt
:cont

edit find.txt

goto fin:

:error
echo.
echo Sintaxis: BUSCA [Cadena]

:fin

Regards/Saludos
Paul

paul@pes-systems.net
Posts: 38
Joined: Thu May 11, 2006 07:41 PM
Saludos de SilData
Posted: Mon May 21, 2007 05:22 PM

Hola MARC:
Segun mi experiencia, puedes utilizar un utility llamado "WINDOW COMMANDER" o como lo llaman ahora "TOTAL COMMANDER", te resuelve el problema de las busquedas sobre cualquier tipo de archivo con cualquier tipo de texto, te lo recomiendo.
Otro que te puede servir es el DANALYST, tambien muy util, si te interesan escribeme a mi correo.
Rodolfo Silva

sildata@cantv.net

Continue the discussion