PDA

View Full Version : Compare Folders and check .txt files in each folder


vlomeester
23-Apr-2010, 02:48 AM
Hello,

I have the following problem:

I have two folders:

Folder1
-textEN.txt
-textUS.txt
-textES.txt
-doctextEN.txt
-doctextUS.txt
-etc

Folder2
-textEN.txt
-textUS.txt
-textES.txt
-doctextEN.txt
-doctextUS.txt
-etc

At this moment compare th folders and i gt a nice result o the differences in files etc.

the next step is to seach for %s or %d in both text files:

-(Folder1)textEN.txt vs -(Folder2)textEN.txt


It ma be the case that in one txt file this may be the case:

S_test := '%s Ths is a test';

And in the other:

S_test := '% s Ths is a test';

or there is no %s at all .

Is ther a possibility to write a scrit for this purpose. Or is ther already something i can use which is build in?


thanks in advance


A

Aaron
23-Apr-2010, 07:56 AM
Hello,

Could you go into more detail on how you would like to "find %s"? What would you like to do with it once it is found? Report which files have "%s" or "% s" present?

Or are you trying to determine if files are equal, and "%s" and "% s" should be considered equal if they are aligned with each other? If so, use BC3 Pro's Text Replacements feature (in the Text Compare's Session Settings, Misc tab. New Replacement: "%s" to "% s". Then set as a Default session setting and use a Rules-based compare in the Folder Compare to run that test on all of the present files.