Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2004
    Posts
    40

    Default /closescript Not Working

    "C:\Program Files (x86)\Beyond Compare 4\BCompare.exe" @"C:\Script.bc" /closescript
    That's, upon finish of the script, the dialog window remains on the screen.
    Currently, the switch /closescript has no effect.
    Question:
    1. How to run a script silently?
    2. How to run a script without showing any dialog window?
    3. How to close a script upon finish?
    Thank you.

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

    Default

    Hello,

    Which version of BC4 are you currently using? Is it the latest 4.1.2 32bit or 64bit? You can check in the Help menu -> About dialog. The install location could be either version, depending if you updated.

    /closescript is currently working on my test system (Win7 64bit with 4.1.2 64bit).

    Are there any errors with your current script, as a pop up warning or in the log?

    1. Yes, you can add /silent but I wouldn't recommend this until the script is running perfectly. Silent suppresses everything: the dialog, warnings and even error messages. You will want to review a log if you are running with silent.

    2. You would use silent to suppress any dialogs

    3. silent would never show a dialog, so there's nothing to close. Without silent, /closescript is expected to close the dialog and should work once we figure out what is going on. Also, is the Close when finished checkbox enabled in the script dialog?
    Aaron P Scooter Software

  3. #3
    Join Date
    Jan 2004
    Posts
    40

    Default

    Hi AAron,
    Thanks for your quick reply.
    After innumerous tests upon your post, I discover and confirm that the window pop-up issue is caused by XYplorer's Catalog alone.
    On the other hand, when running as an XYplorer script, the result is fine as you described.
    I also test it on Macro Scheduler. It runs fine too.
    Thank you for help.

  4. #4
    Join Date
    Mar 2016
    Location
    Paranoia, Colorado
    Posts
    4

    Default

    I'm not sure if it will be of any help but I'd try the following for /closescript:
    "C:\Program Files (x86)\Beyond Compare 4\BCompare.exe" /closescript @"C:\Script.bc"

    And the following for /silent:
    "C:\Program Files (x86)\Beyond Compare 4\BCompare.exe" /silent @"C:\Script.bc"

    As Aaron has noted it would probably be best to have the script running flawlessly before using /silent or at least having verbose logging on:
    log verbose append:"C:\Logs.txt"

    Again, not sure it would help as it might make no difference at all but that's the order I use and both /closescript and /silent work great for me.

  5. #5
    Join Date
    Apr 2005
    Posts
    33

    Default

    I'm having an issue with scripts closing properly. What I see is that sometimes, the progress window (i.e. log) will say that the script is complete, but the button still shows "Cancel" and not "Close". I've had very inconsistent results with /closescript and the "Close when finished" option.

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,384

    Default

    Hello,

    The cancel button would indicate the script is not completed, but the log message that script is finished should be the marker that it is complete. These two seem to contradict each other. If not actually complete, that would be why /closescript is not taking that step. Would it be possible to get a copy of your log to see what steps were taken and what might be keeping it from completing?

    If you let the script sit for a prolonged period of time (as long as you can test), does the script eventually complete?
    Aaron P Scooter Software

  7. #7
    Join Date
    Apr 2005
    Posts
    33

    Default

    Thanks for the reply. Below is a copy of the log from me having just run the script. I've edited out my user name but that's it.

    The script window hung for almost 6.5 minutes before "Cancel" turned to "Close". I had been seeing the "Completed in XX seconds" message in the log and thinking that meant the script was done.

    So I guess the question is: Why does it hang for so long?

    Code:
    3/21/2016 2:47:45 PM  >> 3/21/2016 2:47:45 PM  >> #log normal  append:"C:\Users\xxxxxx\Documents\Beyond Compare Scripts\Sync D to E.log"
    3/21/2016 2:47:45 PM  >> log normal         "C:\Users\xxxxxx\Documents\Beyond Compare Scripts\Sync D to E.log"
    3/21/2016 2:47:45 PM  >> #log verbose append:"C:\Users\xxxxxx\Documents\Beyond Compare Scripts\Sync D to E.log"
    3/21/2016 2:47:45 PM  >> #log verbose        "C:\Users\xxxxxx\Documents\Beyond Compare Scripts\Sync D to E.log"
    3/21/2016 2:47:45 PM  >> criteria attrib:rsh version timestamp:0sec size
    3/21/2016 2:47:45 PM  >> load D:\ E:\
    3/21/2016 2:47:45 PM  Load comparison: D:\ <-> E:\
    3/21/2016 2:47:45 PM  >> filter "-.\$Recycle.Bin\;-.\Search\;-.\System Volume Information\;-.\Temp\"
    3/21/2016 2:47:45 PM  >> option confirm:yes-to-all
    3/21/2016 2:47:45 PM  >> sync create-empty mirror:left->right
    3/21/2016 2:48:26 PM  Successfully synchronized 87 items.  Completed in 40.8 seconds.
    3/21/2016 2:54:11 PM  >> 
    3/21/2016 2:54:11 PM  >> # End of script.
    3/21/2016 2:54:11 PM  Script completed in 6 minutes, 26 seconds
    Last edited by tired; 21-Mar-2016 at 01:59 PM.

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,384

    Default

    After BC4 ends the script, we then try to close down (freeing memory, closing connections, etc). Usually this occurs quickly, but the types of drives you've loaded might have an impact. What types of drives or devices are D:\ and E:\? Are they both internal hdds or are either external disks or remote connections?
    Aaron P Scooter Software

  9. #9
    Join Date
    Apr 2005
    Posts
    33

    Default

    They're both internal SATA HDDs:

    Make = Western Digital
    Model = WD4001FAEX [D:] and WD4003FAEX [E:]
    Interface = SATA 6 Gb/s
    Form factor = 3.5 Inch
    RPM = 7,200
    Capacity = 4 TB
    Cache = 64 MB

    http://www.wdc.com/en/products/produ...px?id=760#Tab3

  10. #10
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,384

    Default

    Do you have any antivirus scanning software or other software running that might interact with the harddrives or BC?

    Also, have you rebooted since the initial test and the issue persists?
    Aaron P Scooter Software

Posting Permissions

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