 
     private func initiateProgressbar(progress: NSProgressIndicator, hiddenID: Int) {
         progress.isHidden = false
-        if let calculatedNumberOfFiles = self.batchTask?.maxcountintask(hiddenID: hiddenID) {
+        if let calculatedNumberOfFiles = self.executebatch?.maxcountintask(hiddenID: hiddenID) {
             progress.maxValue = Double(calculatedNumberOfFiles)
             self.max = Double(calculatedNumberOfFiles)
         }

        self.configurations!.processtermination = .batchtask
        self.batchisrunning = true
        self.estimatingbatchlabel.isHidden = true
        self.batchTask!.executeBatch()
        self.executeButton.isEnabled = false
    }


        ViewControllerReference.shared.setvcref(viewcontroller: .vcbatch, nsviewcontroller: self)
        self.mainTableView.delegate = self
        self.mainTableView.dataSource = self
        self.executebatch = ExecuteBatch()
        self.batchisrunning = false
        self.executeButton.isEnabled = true
        self.estimatingbatch.usesThreadedAnimation = true
