node red zip file set variable file name code example
Example: how to rename zip file nodejs
var AdmZip = require('adm-zip');
var newZip = new AdmZip();
var zip = new AdmZip('somePath/download.zip');
var zipEntries = zip.getEntries();
zipEntries.forEach(function(zipEntry) {
var fileName = zipEntry.entryName;
var fileContent = zip.readAsText(fileName)
var newFileName = fileName.substring(fileName.indexOf("/") + 1);
newZip.addFile(newFileName, fileContent, '', 0644 << 16);
});
newZip.writeZip('somePath/upload.zip');