Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2013
    Location
    Seattle Area
    Posts
    2

    Question Requesting - "how to" for creating logs of just filenames.

    Hello! I'm tinkering around with BC3 and attempting to automate the creation of very simple filename output files. Reviewing the help documentation, I don't see how to do this.

    Desired scenario:

    1. Load the folders to compare - we'll call them Folder 1 and Folder 2 for this scenario.
    2. Do a binary diff check between the two folders, ignoring folder structures.
    3. Output the filenames from Folder 1 that have been changed into an Updated.txt file.
    4. Output the filenames from Folder 1 that are orphans into a New.txt file.
    5. Output the file names from Folder 2 that are orphans into a Old.txt file.


    The key is I want the same output I would get if I selected all from right or left column in the UI, right-clicked, and selected "Copy File Name".

    Examples:

    Updated.txt would have something like:

    C:\Folder1\SubFolder1\file.wav
    C:\Folder1\SubFolder1\file.wav

    New.txt would have something like:

    C:\Folder1\SubFolder1\file.wav
    C:\Folder1\SubFolder12\file.wav

    Old.txt would have something like:

    C:\Folder2\whyisthisevenhere.txt
    C:\Folder2\SubFolder1\oldfile.wav

    And so on...

    Question:

    Can someone show me a script sample of how to get this basic text output in an automated fashion?

    Is it possible? I can't figure out the format.

    If there's a thread on this, a link to that would be appreciated as well - I may have missed it!

    Thanks much for your time! Love this tool, btw! I just need to learn how to automate it!

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hi Lance,

    There are a couple of hurdles I see that could make this a bit tricky, but doable. The first is that scripting does not directly support the flattened folder view as a scripting variable. However, script does support loading a session, and a session can be the flattened folder setting with no folders. Sequentially, script can then load a pair of folders into this session, essentially loading those two folders in a flattened view.

    First, in the graphical interface, load up a new, blank Folder Compare, and change the view mode to Ignore Folder Structure. Then use the Session menu -> Save Session, "FlatFoldersSession".

    Close FlatFolderSession, and now, in scripting you can use two load commands side by side:
    load FlatFoldersSession
    criteria binary
    load "c:\folder1" "c:\folder2"
    folder-report layout:summary options:display-left-newer-orphans output-to:"c:\updated.txt"

    We do not have a report type that is only the file names, but the Summary report (combined with different display options) should be close to your needs. Alternatively, you could use the XML report type, and use another script to parse out and generate the exact reports you require. Do either of these meet your needs? Detailed documentation can be found in the Help file -> Scripting Reference chapter - Folder-report. We have additional scripting information in the Using Beyond Compare -> Automating with Script chapter.
    Aaron P Scooter Software

  3. #3
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    I should add that the session saved in the graphical interface can also do more. You could set your criteria here, or even the pair of folders you wish to compare. The more settings saved as part of the session, the less the script needs to specifically configure.
    Aaron P Scooter Software

  4. #4
    Join Date
    Aug 2013
    Location
    Seattle Area
    Posts
    2

    Default

    Thank you Aaron - I will start with this and see how it works out. I appreciate the assistance!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •