No announcement yet.

comparing two csv files mainly two columns containing time

  • Filter
  • Time
  • Show
Clear All
new posts

  • comparing two csv files mainly two columns containing time

    Hi I am Rupesh from India and I have some csv files and I want to compare these files and so searching for software. I have installed bcompare on my Windows 8.1 PC .

    All the files which I want to compare consists of properties of audio files they are filename, playback length, audio codec, bitrate, file path.

    Suppose I want to compare two files the two files consists of same columns.

    I want to compare two such files considering first column ie., FileName. Can you suggest how to create a new csv file which consists of rows which are unique I mean the FileName field must not contain in the first file or in the second file.

    Suppose the two csv files consists of say 1000 rows with columns FileName, PlayBackLength,Path,AudioCodec. Can you suggest how to create a new csv file which consists of rows which are not equal in PlayBackLength I mean they differ in that column only and has similar values in other columns.

    Also suggest how to calculate total sum of time column which is in format HH:MM:SS


  • #2

    If you use the BC4 Table Compare, you can load your two CSV files. Assuming the columns are in the same positions, the contents should align and compare based on the Key column (default: column 1). Once the data is aligned and comparing row to row with the correct columns, then we can work on the export.

    To export specific data, you can use the Display Filters. Right click the toolbar and switch to Toggles mode, then toggle off Same and Different, leave on Left and Right Orphans to see only those rows. You can then generate a report (Session menu -> Table Compare Report). Or Select All and Copy on one side, then paste into a new text file or Excel, then repeat on the other side to capture both sides and paste into a single file.

    BC4 does not support calculating a sum total, but if you paste into Excel you can use Excel to perform that calculation.
    Aaron P Scooter Software


    • #3
      I have compared successfully two CSV files using b compare based on first column ie., file name but how to compare files based on column consisting of time.

      The second column consists of time in the format of HH:MM:SS.

      May I know how to compare two such CSV files and create a new file which consists of rows with second files time is less than first file I mean comparison must be done on second column of two files and select rows from second file in which it's value is less than corresponding first file value.

      For example first file row consists of 00:45:50 in second column and the second file row consists of 00:30:00 in second column the row from second file must be copied to another CSV file.
      Last edited by rupeshforu3; 31-Oct-2017, 05:11 AM.


      • #4

        BC4 does not have a display filter to show a Less or More option for a numerical column. The Display Filters can show any rows where there is a Difference in a specific column, and ignore differences in other columns, but this would be Greater or Lesser differences. You can right click any column header in the main view to set it to Standard or Unimportant (to be part of the comparison). You can also set any column to be the Key if you need to align on timestamp instead of the filename column, but note that you also need to set Column 1 to be Standard or Unimportant to disable it as part of the Key, otherwise it's the combination of all set Key columns that form the Key together.
        Aaron P Scooter Software


        • #5
          OK it is not possible to compare time. How to export the compared result to excel file.

          I am able to see differences but I can't export the differences to excel file in table compare report. I have copied the differences output from b compare to new excel file in office but what happened is only differences have been copied I mean suppose there are 100 differences and these are only copied.

          What I am expecting is an excel file which consists of differences of play back length side by side and filename, path columns of the corresponding differences.


          • #6

            You can limit the visible columns with the View menu -> Columns dialog. You can then get an export of only the columns you need. However, if you only need columns 1 and 2, it might be easier to perform a full copy/paste of all columns, then delete the unnecessary columns in Excel itself.

            If you are picking up differences from other columns, double check that the column is set to Unimportant, and that Ignore Unimportant Differences toggle is enabled in the toolbar (or View menu). Then use the Display Filter to Show Differences to show only rows with Important Differences.
            Aaron P Scooter Software