Change output folder based on substring in file name

I'm using recognition server to separate documents based on QR codes. The QR codes contain the file name.

Is there a sample script available to move the separated documents into specific folders based on a sub string in the file name?

Would it be easier if I embed both the file name and the file path into the QR code?

Thank you,


Was this article helpful?

0 out of 0 found this helpful



  • Avatar
    Andrew Zyuzin

    Here is a sample how to get barcode value at the separation scrip and how to manage CustomText property: (

    You need to get file name from the QR code using Document Separation script, get sub string from it that corresponds to folder and put its value to CustomeText property.
    Than set up the following scheme for output files: < customtext=""> \ < barcode="">

    To place the whole path at QR code is not worth doing, because then you will have to use the following naming scheme: < barcode=""> . RS will handle the string in this tag as file name but not as a file path, so it will replace all "\" with "_" and you will have file with name "Folder_Name.ext
  • Avatar
    I get an "invalid path format" error when using:

    < customtext=""> \ < barcode="">

    In the "Output Folder" field

  • Avatar
    Just looked at the demo script and I now see I have to put \ in the "File Naming Rule" field. Thanks for your help Andrey.

Please sign in to leave a comment.