If you used the code I provided then that's not true... It will work if the
word "apple" is anywhere in the file's name.
However, it is case-sensitive, so if the file is called Apple_1234.pdf it
will not work.
To make it case insensitive, change the code to:
/apple/i.test(this.documentFileName)
That method overwrites the previous file because what it is doing is only doing this:...
if (/orange/i.test(this.documentFileName)) {
this.info.Title = /orange/i.test(this.documentFileName.replace(/\.pdf$/i,""))
} else if (/banana/i.test(this.documentFileName)) {
this.info.Title = /banana/i.test(this.documentFileName.replace(/\.pdf$/i,""))
}
I did it...
I just left the if statement completely out of the equation for the the Title/Metadata query...
I realised that the program actually does one file at a time meaning it will do the sequence of instructions from start to finish per file and then only work on the next file. Therefore, the computer will not get confused with which document title to use for each file.
North America
Europe, Middle East and Africa
Asia Pacific