The standard FTP receiver can only monitor one directory. However you can write a custom script to monitor multiple directories. Here is an example:
var sftpHost = '{host}'; // change this to the FTP host that you want to connect too
var sftpPort = 22; // change this to the port you want to connect too
var userName = '{username}'; // change this to the FTP username
var password = '{password}'; // change this to the FTP password
var directories = ["directoryA", "directoryB"];
// loop through each directory
for (var currentDirectory = 0; currentDirectory < directories.length; currentDirectory++) {
// get count of files in current directory
var fileCount = qie.countSFTPEndpoint(sftpHost, sftpPort, directories[currentDirectory], true, true, null, userName, password);
qie.warn('Count in ' + directories[currentDirectory] + ': ' + fileCount);
if (fileCount > 0) {
// get filenames for each directory
var fileNames = qie.listSFTPEndpoint(sftpHost, sftpPort, directories[currentDirectory], true, true, null, userName, password);
// loop through each file and pull it down from the ftp server
for (var currentFile = 0; currentFile < fileNames.length; currentFile++) {
var filePath = directories[currentDirectory] + '/' + fileNames[currentFile];
qie.warn('Retrieving File: ' + filePath);
// this line will retrieve the file from the ftp server and then DELETE it
var file = qie.readSFTPFile(sftpHost, sftpPort, filePath, true, null, true, true, null, userName, password, 60000);
// extract file bytes from XML message that is returned (the XML message contains the file meta-data and the base64 encoded bytes
var fileBytes = qie.base64DecodeToBytes(file.getNode('/ftpFile/encodedBytes'));
// add file to inbound queue
qie.addInboundMessage(fileBytes, fileNames[currentFile]);
}
}
}