Skip to main content
Solved

BoxDownloader Duplicate file names


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.

View original
Did this help you find an answer to your question?

2 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • 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
daveatsafe wrote:

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!

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings