def run(self): report = [] for sf in os.listdir(self._source_path): dest_path = os.path.join(self._dest_path, sf) shutil.move(os.path.join(self._source_path, sf), dest_path) productutils.set_file_permissions(dest_path) report.append("Products {0} moved.".format(sf)) #TODO change file permissions if len(report) == 0: report.append("No products to move ...") return report
def run(self): report =[] for sf in os.listdir(self._source_path): dest_path = os.path.join(self._dest_path,sf) shutil.move(os.path.join(self._source_path,sf),dest_path) productutils.set_file_permissions(dest_path) report.append("Products {0} moved.".format(sf)) #TODO change file permissions if len(report) == 0: report.append("No products to move ...") return report
def run(self): shutil.move(self._source_path, self._dest_path) productutils.set_file_permissions(self._dest_path) return ["Products folder moved.".format(self._source_path,self._dest_path)]
def run(self): shutil.copytree(self._source_path, self._dest_path) productutils.set_file_permissions(self._dest_path) return ["Products copied."]