scriptingbeyondcomparebeyondcompare3

Using a beyond Compare script To Get the total files and lines of code in a directory


Trying to get the current number of lines in a directory Current command:

load "C:\dir" " "
expand all
TEXT-REPORT layout:statistics output-to:"BCREPORT.csv"

It gives me a report that has"" in the upper-left corner.

I might be using the wrong type of report. I'll try a folder report at this point.


Solution

  • The  is the UTF-8 BOM.

    I guess with the upper-right corner you mean the begin of the document text. So there is no wrong type of report only a flag for the encoding of the report content.

    See also http://www.scootersoftware.com/support.php?zz=kb_filereportencoding (Attention, belongs to old version BC2):

    WHAT CHARACTER ENCODING DOES BEYOND COMPARE SAVE REPORT FILES IN?

    Beyond Compare's File Differences Report command generates report files (plain text) in the same character encoding as the left side file.

    For example, if the left side file is ANSI, the report generated will be ANSI. If the left side file is UTF-8, the report will be generated in UTF-8.

    So if your compared file on the left side is ANSI, then the report would also be ANSI (if there was no change since version BC2))