Announcement

Collapse
No announcement yet.

Server not available

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Server not available

    Hi everybody,
    I'm currently using a script to compare and update servers to my hard-disk.
    Problem:
    If one of those servers is not present, the whole script just stops.
    'Script Error: Unable to load base folder '
    '>> User Canceled '
    Can I either check if a server is there before I execute the 'load server' or at least tell the script to continue with the next 'load server-n' on the list?
    Thanx
    VSD

  • #2
    Re: Server not available

    Scripts are designed to stop if they encounter an error.

    The best way to handle this is to use a separate script for each server, and call them all from a single batch file.

    If you're doing the same type of update for each server, you can use one script and pass the source and destination into the script from the command line.

    If you just need to change the folders being loaded, you can use the command:
    bc2 @script path1 path2 from the command line, and use the command load %1 %2 in your script. The command line arguments will be expanded in the %1, %2, etc. BC supports passing up to 9 command line arguments into a script.
    Chris K Scooter Software

    Comment


    • #3
      Re: Server not available

      With over 40 servers now I'd have to go for the one script per server solution and call them silent from an extra script. The nine variables should be enough to cater for the differences in the servers ...
      Would be nice though if a future version of BC2 would support continuing with the next load on error. The error could be a server not there, a folder deleted or on Unix permission problems with files/folders (which would be even worse as I'd have to set up one script per folder).
      Thanx for the workaround
      VSD

      Comment


      • #4
        Re: Server not available

        Thank you for the suggestion, I will add it to the wish list.
        Chris K Scooter Software

        Comment


        • #5
          Re: Server not available

          I have a computer set up with Version 2.0.1 for this exact reason. This version skips UNC that it cannot connect to using "option confirm:yes-to-all". Upgrading removed the capability, so I put the old version back on again. Looking forward to being able to run new features with the old capability.
          Foz

          Comment


          • #6
            Re: Server not available

            It is now intended behavior that BC not continue if the path to a folder is incorrect. You can, however, write a slightly different script that will allow BC to continue.

            Write a script that takes in %1 and %2 as arguements (these will be the file names). Then the bat file would consist of:
            BC2.exe @script1 name1 name2
            BC2.exe @script1 name3 name4
            BC2.exe @script2 name5 name6

            each instance of bc2 has the potential to not work, but the bat file will then continue to the other calls. You can also, in this way, have only a couple of actual script files (%1 %2 and do script1; %1 %2 and then do script2). That way, if the compares between name1 name2 and name3 name4 are the same, you could just use the same script file. the name5 name6 compare could then load a different script file.
            Aaron P Scooter Software

            Comment

            Working...
            X