Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2017
    Posts
    5

    Default Defining Environmental Variables

    How do I define an environmental variable in BeyondCompare? What are the predefined environmental variables in BeyondCompare available to be used in scripts?

    For example, I want to use the environmental variable: %BackupFilePath%.
    Is this environmental variable predefined in BeyondCompare?
    The path that I want BackupFilePath to be is: "C:\users\labuser\AppData\Local\Company\SoftwareNa me\Archive\c62d1a84-307d-4b2a-a34f-490a463c\BinderA\FileName.csv" where the FileName.csv will not change.

    I am trying to call this environmental variable in my script file to compare two files, currently using it as "%BackupFilePath%\FileName.csv"

    Thank you.

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

    Default

    Environment variables are defined on a system-wide basis, or in the command line environment where Beyond Compare is called. BC does not have a way to define variables that are specific to it.

    To change a variable system-wide, click the Windows Start menu and type "Environment". It should populate with various choices including "Edit the system environment variables" and "Edit the environment variables for your account". That will make them available for every program running on your computer or username.

    To set them in a batch file, use: set BackupFilePath="C:\users\labuser\...."

    You can see what variables are currently available by using the "set" command from the command line.

    Once you have them set up correctly, BC can access them if you put a % before and after the variable name, like so: %BackupFilePath%
    ZoŽ P Scooter Software

  3. #3
    Join Date
    Nov 2017
    Posts
    5

    Default

    Zoe, thank you very much, this helps identify where to troubleshoot. BTW I love the BeyondCompare tool.

Posting Permissions

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