1 Reply Latest reply on Jan 27, 2011 6:19 PM by Naveen Anne

    Delete Depot File (BLCLI)

      Hi,

       

      I presently have a script that adds a file to the Depot and have been unable to find a CLI command that will let me remove said file from the depot.. Has anyone come across a method to do this.. the CLI documentation is prettly lite when it comes to the depot..

       

      <snip>

      DEPOT_GROUP="$1"
      DEPOT_NAME=$SERVER_NAME "_Collect_Log.txt"
      DEPOT_DESCRIPTION="$SERVER_NAME Collection Data"

      SRC_FILE_LOC="//$SERVER_NAME/$PROP_SYSROOT/Temp/$DEPOT_NAME"

      echo "DEPOT_GROUP = " $DEPOT_GROUP
      echo "DEPOT_NAME = " $DEPOT_NAME
      echo "DEPOT_DESCRIPTION = " $DEPOT_DESCRIPTION
      echo "SRC_FILE_LOC = " $SRC_FILE_LOC

       

      x = `blcli -v DepotFile addFileToDepot $DEPOT_GROUP $SRC_FILE_LOC $DEPOT_NAME $DEPOT_DESCRIPTION`

       

      Thanks.

        • 1. Delete Depot File (BLCLI)
          Naveen Anne

          Which version of BladeLogic are you using?

          There is an unreleased blcli command: DepotFile deleteFileByGroupAndName

           

          The documentation for unreleased commands is available here:

          http://communities.bmc.com/communities/docs/DOC-8922

           

          To run the unreleased commands in your script, you would have to use it in one of the following two ways:

           

          blcli -Dcom.bladelogic.cli.debug.release-only="false" DepotFile deleteFileByGroupAndName "${DEPOT_GROUP}" "${DEPOT_FILE_NAME}"

           

          Alternatively you can run it as:

          blcli_execute DepotFile deleteFileByGroupAndName "${DEPOT_GROUP}" "${DEPOT_FILE_NAME}"

           

          Thanks