Leave feedback
  • Question

    How to get path of input file

Enter a new topic
  • Aristar Borg Aristar Borg
    0 likes 375 views

    Hi all,

    ... and Happy New Year!

    How can I get the absolute path of the input file?
    CurrInFileName() gives me only the file name.

    Thanks.

     

    Best regards
    Aristar

     

     

     

     

     

    Wednesday 04 January, 2017
  • Jon Jonsson Jon Jonsson
    0 likes

    Hi Aristar,

    You can combine the functions CurrInRealPath() and CurrInFileName(). CurrInRealPath() gives you the absolute input path, but you have to filter away the last added part in the received string (e.g. '\streamserve_proc\ds169814835232598030.tmp').

    BR
    Jon

    Wednesday 04 January, 2017
  • Aristar Borg Aristar Borg
    0 likes

    Hi Jon

    When I try CurrInRealPath() on its own I don't get anything. What do you mean combine the 2 functions please?

    thanks
    Aristar

    Wednesday 04 January, 2017
  • Jon Jonsson Jon Jonsson
    0 likes

    Hi, Aristar,

    I forgot to mention that CurrInRealPath() only works without using queing. I suppose you have queues setting on the input connector? Is it possible to set the inconnector without?

    BR
    Jon

    Wednesday 04 January, 2017
  • Aristar Borg Aristar Borg
    0 likes

    Hi Jon

    yes I am using queuing and I don't want to change things too much. Is there another way?
    Maybe the directoryscanner listener or something like that?

    thanks
    Aristar

    Wednesday 04 January, 2017
  • Stig Renberg-Larsen Stig Renberg-Larsen
    1 likes

    hi.

    why don't you use the function 

    inconnectorname()

    instead... if you're using several dirscan-connectors?

     

    //Stig ;-)

     

    Wednesday 04 January, 2017
  • Jon Jonsson Jon Jonsson
    1 likes

    Hi Aristar,

    Unfortnely I do not have any suggestion when, using queues, to directly get the input path.

    If you want to go for Stig's suggestion with InConnectorName(), you need a map table or likely with config for the actual dirscan folder for each input connector, and then map the path against fetched connectorname. If so, do not forget that you have to map even each layer (if multiplied used), since you can have different dirscan folder settings on each layer. You will also have to change/add in the config whenever a input connector is changed or added.

    BR
    Jon

    Wednesday 04 January, 2017
  • Aristar Borg Aristar Borg
    0 likes

    Thanks for the suggestions guys.

    Wednesday 04 January, 2017

 

Latest from the blogs

Read more