Skip to main content

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?

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.


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!

 


Reply