Announcement

Collapse
No announcement yet.

files that have similar names comparision

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • files that have similar names comparision

    Is there a way to compare folders that have files that have the same begining part of the name and a different part at the end of the name?
    Here's my scenario:

    I have 500 stores. Once per week each store posts their weekly file and names it with their store name and the date(SW_Santaana08242005.csv) . I need to be able to tell what stores have not posted their file. How would I do this?

  • #2
    Re: files that have similar names comparision

    I assume you have a file somewhere with a list of all of your stores? If so, create a file with a listing of the names of all of the files you have received, and compare it to your master list using a rule that excludes numbers as unimportant text.

    Comment


    • #3
      Re: files that have similar names comparision

      I'm not sure BC can do this without help, so to solve this you probably need a renaming tool that can convert filenames from %STORENAME%MMDDYYYY.csv to %STORENAME%.csv. Here is a good freeware one which might help : http://www.1-4a.com/rename/

      then....

      1. Create a folder called \Master\ which has a complete list of converted filenames.
      2. At the end of every week create a new folder something like \StoresMMDDYYYY\ with that week's converted filenames.
      3. Use Beyond Compare to compare the two with "Only Orphans" filter selected

      Paul
      IDS Ltd

      Comment


      • #4
        Re: files that have similar names comparision

        I am in a very similar situation.... For example, I have a slew of files in two separate directories that have similar names... but not identical. Like this (notice first character):

        DIR_1
        r001001001.pcx
        r001001002.pcx

        DIR_2
        t001001001.pcx
        t001001002.pcx

        I need to make comparisons between the similar files, but BC doesn't know to do this.

        If this were to work a lot easier than a third party "rename" utility, I'm sure our company would be in a position to buy plenty more licenses!!!

        Comment


        • #5
          Re: files that have similar names comparision

          Comparisons of files with name differences that are ignored based on masks/wildcards is on our wish list for a future version of BC.

          In the current version there are two ways to handle this:

          1) As described by an earlier poster, copy the list of file names to a text file and compare against a master list. Set a rule to ignore the date portion of the names as unimportant text, set to never align mismatches, then filter to only display different lines.

          2) Rename the files so the names match. You don't need to use a different utility to rename the files. BC has multiple file renaming built in.

          To rename files of the form:

          SW_Santaana08242005.csv to SW_Santaana.csv

          Select Actions|Rename, select Regular Expressions, then use Old Mask: (\D+)\d+ and New Mask: $1 to rename the files.

          The \D means any non numeric character, the + means 1 or more of the preceding character. Parenthesis save the match so that $1 means the first parenthesis match text. \d means any numeric character. More regular expression information is available in BC's help file.

          For the other set of names (r001001001.pcx, t001001001.pcx), you can strip off the first character from each name by doing a regular expression rename with a . (match any character) as the Old Mask and leave the New Mask blank.
          Chris K Scooter Software

          Comment


          • #6
            Re: files that have similar names comparision

            Chris,

            How do I "Set a rule to ignore the date portion of the names as unimportant text, set to never align mismatches, then filter to only display different lines."

            Thanks for the help, can you give me a walk through on the above mentioned tip?

            Comment


            • #7
              Re: files that have similar names comparision

              First create the list of the new file names. You can copy the new file names from BC by selecting them, then select Actions|Copy Filename. This will allow you to paste the file names and paths.

              Open your list of original names and new names in BC.
              Select Tools|Edit Current Rules.
              Go to the Importance tab.
              In the Unimportant Text section, click New.
              Select the Regular Expressions category and enter \d{8}. This means any string of 8 numbers.
              Close the dialogs until you get back to the File Viewer and make sure View|Ignore Unimportant Differences is turned on.

              Chris K Scooter Software

              Comment

              Working...
              X
              😀
              🥰
              🤢
              😎
              😡
              👍
              👎