How can I reference and manipulate the fileName on file type fields?
Options
Kevin_102667
Posts: 56 admin
Use Case: I need to sanitize fileName from file
type fields.
For example, if I have a file called test-#%*>?.png
, I need to replace the invalid characters (#%*>?) and rename it to test------.png
. I can't use File: Rename a file
because I need to be able to reference the original fileName.
3
Best Answer
-
@Kevin_102667 - I think you can use the below series of actions:
1. Files: Get file information - retrieve the name of the file in a standalone text field (standard outputfield-name--File name
)
2. Field: Field Formulas - take the text retrieved in the file-name output of the first step and write a field formula to replace special characters with '-'
3. Files: Rename a file - use the original file in the File field and input the output name from step #2 in the New Name field.5