I would agree, except.... occasionally a file does not get processed for some 
reason and this is often why 

they need to do a search, to see if a file was actually recieved for a 
particular document and for some 

reason not processed.   In this case, there were be no record in Rbase to add 
the container file name to. 



I have thought about adding the file name to the Rbase records and do a search 
there first and then if 

not found, search the external files.  In any case,  the ability to 
search archived file content is going to 

be needed. 



Thanks again, 

-Bob 



----- Original Message ----- 
From: "Alastair Burr" <[email protected]> 
To: "RBASE-L Mailing List" <[email protected]> 
Sent: Tuesday, November 10, 2009 11:57:09 AM GMT -06:00 US/Canada Central 
Subject: [RBASE-L] - Re: Searching for file contents 


Why not search the files as they come in to find the relevant idnums and put 
that info in a table with the file name? 

That way you can search your table very quickly and then open the file in 
whatever way you want. 

Regards, 
Alastair. 




From: [email protected] 
Sent: Tuesday, November 10, 2009 5:39 PM 
To: RBASE-L Mailing List 
Subject: [RBASE-L] - Re: Searching for file contents 




Thank you to all who replied.  I think I need to explain a bit further. 



First I am not needing to replace strings, but simply find what files may 
contain a string. 

We recieve documents via EDI that contain several types of information, such as 
Purchase Orders, 

Advanced Ship Notices, Invoices, etc. etc. 



These documents come in through an AS2 or VAN (ftp) connection and are 
processed continously, 

24 hours per day.  The file names that these documents come in have no 
relevance to what they are.  

Usually the format is YYYYMMDDxxx.xxx  with x being a sequential number.   
However, the format 

does differ from various sources.  So a PO  and an Invoice document is not 
dicernable by the file name. 



On occasion, a user will need to look at the raw data (i.e. the YYYYMMDDxxx.xxx 
or whatever file) that a 

certain PO, Invoice, ASN etc.  came in on.  It may be 2 or 3 days later for 
example and hundreds of files have been recieved in since. 



I want to create a button that a user can enter a PO number, invoice number 
etc. and the program do 
a search through several hundred files and find the one desired.  Therefore I 
need to be able to search 

the contents of hundreds of files residing in an Archive Folder for a specific 
string such as PO number. 

Once found, I would then open the specific file automatically for review by the 
user. 



This could be done by using the Windows Search option and manually opening the 
file, but I am 

wanting it to be an option within my application.  The key here is that a 
typical search will be going 

through hundreds of files and needs to be a very efficient method.  



Hopefully this better explains my requirement.   



Thanks, 

-Bob 







----- Original Message ----- 
From: "MikeB" <[email protected]> 
To: "RBASE-L Mailing List" <[email protected]> 
Sent: Tuesday, November 10, 2009 9:17:29 AM GMT -06:00 US/Canada Central 
Subject: [RBASE-L] - Re: Searching for file contents 

You can set the file as a VarChar and use SLOC to determine if the string 
value is in the file. 

Set var VFile VarChar = ['TheFullPathNameOfTheFile'] 

set var vSloc integer = (SLOC(.VFile, 'ST*856*123')) 
if vSloc > 0 then 
  pause 2 using '"ST*856*123" found in current file' 
else 
  pause 2 using 'No Matching String in current file' 
endif 



----- Original Message ----- 
From: <[email protected]> 
To: "RBASE-L Mailing List" <[email protected]> 
Sent: Tuesday, November 10, 2009 10:03 AM 
Subject: [RBASE-L] - Searching for file contents 




In Windows you can search for a specific text string in all files for a 
folder(s). 

DOS has a similar FIND command. 



I need to be able to execute this function from within Rbase. Say there are 
100 files 

in a folder and I need to find the one that has "ST*856*123" in it. 



I can ZIP a FIND command, output the results to a text file, load the text 
file into Rbase 

and then parse the temp table to see if the string was found. 



Any better ideas on how to accomplish this? 



Thanks, 

-Bob 








No virus found in this incoming message. 
Checked by AVG - www.avg.com 
Version: 9.0.704 / Virus Database: 270.14.59/2494 - Release Date: 11/10/09 
07:38:00 

Reply via email to