Question

Writer for bulkattribute renamer

  • 18 June 2021
  • 1 reply
  • 0 views

Hi everyone. I have a easy question but i can't be able to ressolve. I have a bulkattributerenamer. The reader is a Directory and path filename. The folder containt PDF (no spatial). The name of all the PDF begin with __, like __PZ440.pdf. I want to remove the __ for keep the PZ440.pdf But i have some trouble with the writer. I can't find the right writer. I know is a beginner question so thank you for helpBulk


1 reply

Userlevel 3
Badge +17

Hi @hugues​ 

It appears you want to rename your PDF files. In that case, I would recommend using the File Copy writer. Note that you have to specify the following format attributes on the File Copy writer:

  • filecopy_source_dataset (required)
  • filecopy_dest_filename (required)
  • filecopy_dest_dataset (optional)
    • only if you need to specify a destination subfolder as a relative path within the writer dataset folder

 

The filecopy_source_dataset attribute needs to be the original file path (eg. C:\\Input\\__PZ440.pdf). Since you have removed the __ from all attributes using the BulkAttributeRenamer, you cannot specify path_windows (or path_unix if you are using macOS or Linux) for this format attribute.

 

I would recommend not using Rename: All Attributes in the BulkAttributeRenamer and only modify path_filename. This allows you to use the path_filename value as the value for filecopy_dest_filename and path_windows for filecopy_source_dataset.

Reply