Community

Parse Filename

How is it possible to parse a filename within ABBYY FC 11 such that part of the filename can be used as a metadata field?  For example, suppose the file was called "179989 - MSKU8598475 -7015598.pdf" (without the quotes), and you needed to pull in the first 6 digits or whatever is there before the first "-".

0

Comments

3 comments

  • Avatar
    Vladimir Dimitrijević

    Hi,

    If you are importing files using hotfolder, you need to create new Service field called "ImageSource". In Data Source tab, choose source "Image source". Afterwards, create new rule something like:

    string imageSource = Context.Field("ImageSource").Text;
    imageSource = imageSource.Split('-', [0]);

    Happy coding.

    Best regards,
    Vladimir

    0
  • Avatar
    Mark Spitz

    Hello Vladimir, can you please expand or point us in the right direction on on how we can create the new service field called "ImageSource?"  We currently have several hot folders in Project Setup station -> Project -> Image Import Profiles.

    Also, where is this "Data Source tab" that you mention.

    Including some screenshots would be great.

    Thank you.

    0
  • Avatar
    Vladimir Dimitrijević

    Hi,

    You can create Service field in Document definition. Right click in Fields pane -> Create Field -> Service Field.

    Best regards,
    Vladimir

    0

Please sign in to leave a comment.