Third Party Utility File Path

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JWillard
    Visitor
    • Nov 2017
    • 5

    Third Party Utility File Path

    Hello-

    I am using FactoryTalk AssetCentre to call the BeyondCompare utility. When I run my batch file in the command line, the two files I want to compare are not findable, although they do exist in FactoryTalk AssetCentre. I do not want to use a hard coded file path. I am using a file path mnemonic in my batch file, that doesn't appear to be working.

    My Script:
    text-report layout:side-by-side &
    options:ignore-unimportant,display-context &
    output-to:%3 output-options:html-color %1 %2

    My batch:
    "C:\Program Files\Beyond Compare 4\BCompare.exe" @"C:\Scripts\Compare2Files.txt" "%BackUpFilePath\Test.csv" "%ArchiveFilePath%\Test.csv" "%ReportFilePath%\GeneratedReport.html"

    I suspect that I need to somehow specify or call FactoryTalk AssetCentre in my batch or script, although I am not sure.

    Will someone please advise?

    Thank you.
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    In your batch file, you're missing a closing % on "%BackUpFilePath\Test.csv", it should be "%BackUpFilePath%\Test.csv". If paths contain spaces, you might also want to place quotes around the variable names in your Beyond Compare script.

    text-report layout:side-by-side &
    options:ignore-unimportant,display-context &
    output-to:"%3" output-options:html-color "%1" "%2"

    We don't have any experience with FactoryTalk AssetCentre.
    Chris K Scooter Software

    Comment

    • JWillard
      Visitor
      • Nov 2017
      • 5

      #3
      Thanks Chris, that unfortunately did not solve my issue.

      My follow up question is, does BeyondCompare accept environmental variables such as %BackUpFilePath% or %ArchiveFilePath% in place of a file path? What's the appropriate syntax?

      When I run this bat file in the command line prompt, it errors out and shows the path as "\TestRecipe" noticeably not finding the environmental variable path I am using. Do you have any recommendations, besides hard coding the path, to help BeyondCompare identify the path?

      Thanks,
      Jessie
      Last edited by JWillard; 24-Nov-2017, 03:42 AM.

      Comment

      • Zoë
        Team Scooter
        • Oct 2007
        • 2666

        #4
        Hi Jessie,

        Beyond Compare supports reading environmental variables using the %variable_name% syntax, so if %BackUpFilePath% exists and that's how it's written in the script, BC will try to expand it.

        In your case, the environment variable expansion is handled by the batch file, not BC. By the time we see it, %BackUpFilePath% will have already been replaced. From your description, it sounds like AssetCentre isn't setting the variables correctly. If you run the "set" command (no arguments) from the command line, you can see what environment variables exist on your system. Unfortunately, as Chris mentioned, we don't have any experience with that product, so we can't provide much help with setting up it specifically.
        Zoë P Scooter Software

        Comment

        • JWillard
          Visitor
          • Nov 2017
          • 5

          #5
          Thank you very much, I will be able to move forward with this information.

          Comment

          Working...