Community

Script in scanning station

Hello,

As I have read in help topics of scanning station , A script can be added to make 2 different exports ("Possibility to save pages to two export targets simultaneously, one of which can be used for back-up"). What I would like to do is the next:

- A first exportation to a flexicapture projet to make the requiered extration data of the project
- Then , and automatically, to make a second exportation to a folder on the desktop to have a back up. After that, and also automaticalyy, to erase the batch form the interface of the scanning station.

Sometimes I need to recover some images already scanned and that's the reason I have to have the back up , but the problem is the more images I have on the scanning station the much time the scanning station takes to load and to be operative.

Thank's


0

Comments

4 comments

  • Avatar
    Sushi
    Robsan,

    Not sure how good you are at writing code, but in the Scan Station Help file, there is a sample jscript code to export your batches to a local folder. All you would need to do is add the additional script to also send it to FlexiCapture Server. Then on the ScanStation Option, under the General Tab, click the option to Delete Batch after sending. This should accomplish you sending to FlexiCapture server, saving to local folder, and deleting the batches after they have been sent.

    On the other hand, if you're like me and not as proficient in scripting, I would do the following:

    1) Click the option "Deleting Batch Automatically after sending" in the Scan Station option setting.
    2) Let the Scan Station operator Send to FlexiCapture by default
    3) Create 2 export setting in my DocDef. 1 for my regular export for the meta data and 1 for just image of the documents.

    By doing this, I have dynamic control of the naming of the images, a central location for all the images to be saved, how I want the images to be saved, etc.



    0
  • Avatar
    Robsan
    Thanks, Sushi,

    The thing is that I am not good at writing code. I tested and studied the sample jscript code that you mentioned several days ago and tried to use it as an event script that happends after exportation but it did not work. The idea was to send the batch to a specific FC project, delenting afterwards the batch with the option you mentioned an in a parallel way saving the images into a folder. What you secondly propose does not fit exactly to my need because I must have the back up of the images before arriving at the FC server. Sometimes, a operator by mistake erase an image from a verification task of a batch or in some cases with no aparent reason the image "dissappears". Thanks.
    0
  • Avatar
    Sushi
    Robsan,

    The sample script in the help file was design to work only during export. Some of those object do not exist before then. If you want, you can try the following script. Set it to run "On Batch Sent" Also make sure you still enable "delete batch automatically before sending"

    var fso = new ActiveXObject("Scripting.FileSystemObject");
    var ResultPath = "";
    if( ResultPath == "" ) {
    ResultPath = \\\\PCName\\ShareFolder\\ScanningExport;
    }
    if( !fso.FolderExists( ResultPath ) ) {
    fso.CreateFolder( ResultPath );
    }
    var d = new Date();
    var n = d.getTime();
    var params = NewImageSavingOptions();
    params.AddProperFileExt = true;
    params.Format = "tif";
    this.Batches.Item(0).SaveAs(ResultPath + "\\" + n + "-export.tiff");



    Basically this script will save all the batch file as 1 multipage TIFF File in a on a Sharefolder on a computer named "PCName" So that to not overwrite the file, it appends some number in front of the TIFF file.

    Maybe someone can make this script a little bit more smart for you. i.e. some having the operator value, custom date format, dynamic folder naming, etc.








    0
  • Avatar
    Robsan
    Thanks a lot, Sushi, I´ll try it and tell how is going!
    0

Please sign in to leave a comment.