Is it possible to access the extracted Archive Name? Can't find the value here in examples of scripts or in the API?
I can get the ArchiveName how the archive itself is named. But not the folder name inside the archive what is extracted. I want to access it and pass it as an argument to my python script. Any clues?
Code:
disablePermissionChecks();
var extractionFolder;
var archiveName;
package.getArchives().forEach(function (archive) {
archiveName = archive.getName();
archive.getDownloadLinks().forEach(function (link) {
while (
link.getExtractionStatus() == "IDLE" ||
link.getExtractionStatus() == "RUNNING"
)
sleep(1000);
});
});
var packagename = package.getName();
var folderLocation = package.getDownloadFolder();
var cmd = "python";
var script = "/output/Scripts/Uppy/sorter.py";
alert(packagename, extractionFolder, archiveName)
var command = [cmd, script, packagename, folderLocation, extractionFolder]
alert(callSync(command))