Skip to main content
Best Answer

BoxDownloader Duplicate file names

  • March 12, 2018
  • 2 replies
  • 25 views

I'm using the BoxConnector transformer to download several hundred XML files which are spread across a large folder structure.(Using this https://knowledge.safe.com/questions/45772/how-can-i-download-a-file-from-boxcom-google-drive.html as a starting point)

Many of these files have the exact same file name, so when downloading locally they are overwriting each other.

Is there a way to add a counter or change the file attributes at the point of download to generate a unique file name or put them into individual folders?

Best answer by daveatsafe

Hi @mesmath,

We have an enhancement request in the pipeline to allow you to set the download filename from an attribute. Until this is finished, however, please download as an Attribute instead of as a File, then use an AttributeFileWriter directly after the BoxConnector to write that attribute to a file. The AttributeFileWriter allows you to set the output file name from an attribute, so you can write to any filename you like.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • Best Answer
  • March 12, 2018

Hi @mesmath,

We have an enhancement request in the pipeline to allow you to set the download filename from an attribute. Until this is finished, however, please download as an Attribute instead of as a File, then use an AttributeFileWriter directly after the BoxConnector to write that attribute to a file. The AttributeFileWriter allows you to set the output file name from an attribute, so you can write to any filename you like.


  • Author
  • March 12, 2018

Hi @mesmath,

We have an enhancement request in the pipeline to allow you to set the download filename from an attribute. Until this is finished, however, please download as an Attribute instead of as a File, then use an AttributeFileWriter directly after the BoxConnector to write that attribute to a file. The AttributeFileWriter allows you to set the output file name from an attribute, so you can write to any filename you like.

Brilliant, thanks @DaveAtSafe that has done the trick. Good to know it will be available in the future and I wasn't just missing something!