Forum Discussion

amit_saroha's avatar
amit_saroha
New Contributor III
4 years ago
Solved

How to write file with a specific name?

Hi,

I am writing a zip file and I have a document id that I want to use as the zip file name. Could you suggest how to achieve it?

  • Apologies, the datatype is local datetime. That’s why.

    I believe .toString() will do the job

4 Replies

  • Hi @amit.saroha,

    One approach is to put the snap that writes the file into another pipeline and use it as a child of the current one.
    Inside child, you will create a parameter and you will use this parametes as name of the file.

    With Pipeline Execute you will call that child pipeline.

    Regards,
    Viktor

  • Scenario above is for if you write a file. If you read you can simply toggle button for the Expression Builder and select the $DocumentID

    • viktor_n's avatar
      viktor_n
      Contributor II

      On the left side there is a botton( = ) check that and replace file name with this one "Temp_Files/" + $DocumentId + ".zip"