Page 1 of 1

RegEx on multiple files

Posted: Fri Mar 11, 2011 7:05 pm
by rfossella
Hi,

I have implemented several Regular Expressions (RE) in CompareIt for a single file comparison - and this works
e.g I am ignoring anything with DATE: or RUN:

My question is, can I compare two folders of files (using CompareIt or SynchronizeIt) using regular expressions? Can I do it from a command line?

I tried 'Compare Folders' from CompareIt but it does not apply the REs.

Any info is appreciated.

Thanks.
Rob

Re: RegEx on multiple files

Posted: Sun Mar 13, 2011 9:41 am
by grigsoft
So you want to compare several files in folders, and in each file use same regexp rules? In fact CompareIt should do this automatically, if this is set in options. I will recheck this.

Re: RegEx on multiple files

Posted: Mon Mar 14, 2011 6:22 am
by rfossella
So you want to compare several files in folders, and in each file use same regexp rules? In fact CompareIt should do this automatically, if this is set in options. I will recheck this.
Yes, that's exactly what I need to fulfill a requirement. I have tried to run comparison on folders of files, but the RegEx are not applied. Running single file compare in the UI works fine.

Thanks!
Rob

Re: RegEx on multiple files

Posted: Mon Mar 14, 2011 11:25 am
by TonHu
Afaik, Synchronize It! doesn't automagically use Compare It! for file(content)-comparison. Unless that has recently changed?

Re: RegEx on multiple files

Posted: Mon Mar 14, 2011 3:35 pm
by grigsoft
CompareIt can generate reports on multiple files itself.

Re: RegEx on multiple files

Posted: Mon Mar 14, 2011 11:02 pm
by rfossella
I was able to run CompareIt against folders using a new Profile that included Regular Expressions, but ONLY from a command line - e.g.
"C:\Program Files\Compare It!\wincmp3.exe" "C:\temp\rpts1" "C:\temp\rpts2" /R /m "*.htm" /G:NCWEZ /cmp:MyNewProfile c:\reports\

Running from the Command Line proved successful however, when I tried to run the same folders Comparison from the UI - i.e. File>Compare Folders... this did not work correctly as I got reports that did not apply RE.

What I did for the latter was follow the CompareIt docs that stated to create a File Filter that used the my new Profile in the 'Compare As' dropdown.

Any ideas why this is not working in the UI?

I can send screen snapshots of my process.

Thanks.
Robert

Re: RegEx on multiple files

Posted: Tue Mar 22, 2011 7:36 am
by rfossella
Is there a way to apply the regular expression filters used in CompareIt inside SynchonizeIt. It would be useful to reuse them.

Robert

Re: RegEx on multiple files

Posted: Tue Mar 22, 2011 8:40 am
by rfossella
Some further confusion on the folder comparisons in CompareIt within commandline.

I have two sets of 5 files within folders - each corresponding file contains different date text. I am not including any profile i.e. no /cmp: option.

When I run the compare I'm expecting to see all 5 files reported as different, however, only the first file is marked as different. All others are ignored and/or report as identical.

my commandline is:
wincmp3.exe "C:\PROD/docs" "C:\TEST/docs" /R /m "*.htm" /G:NCWXEZ C:\myReports

Again. I'd expect 5 reports to be generated indicating diffs.

Missing something?

Thanks.
Rob

Re: RegEx on multiple files

Posted: Wed Mar 23, 2011 3:49 pm
by grigsoft
As for last question, last used comparison profile will be used. if it "date+size", and size\date is same, files will be skipped.