Skip navigation

Javascript/ Batch Processing - Query (Please assist/advice)

Sep 19, 2011 11:23 PM

  Latest reply: alienA2, Oct 4, 2011 11:32 PM
Replies 1 2 Previous Next
  • Currently Being Moderated
    Oct 4, 2011 1:29 AM   in reply to alienA2

    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)

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 4, 2011 1:38 AM   in reply to alienA2

    Not sure what you mean by "add description for "apple""? Do you mean that

    you want to edit the meta-data of the file?

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 4, 2011 2:02 AM   in reply to alienA2

    But which field in the meta-data?

     

    Let's say it's "Title". In that case, you use the same if-statement, and

    then add:

    this.info.Title = "Apple"

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 4, 2011 2:14 AM   in reply to alienA2

    Correct.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 4, 2011 2:41 AM   in reply to alienA2

    I wrote to you in an earlier post how to get the file name (without the

    extension). Simply apply that to this.info.Title.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 4, 2011 4:17 AM   in reply to alienA2

    this.documentFileName.replace(/\.pdf$/i,"") gives you the current file's name minus the extension. Think how you can incorporate that in the code you already have...

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points