Hello!
I'm wondering if there is a way to have Alteryx rename pdf files based on certain columns in Excel. For example:
Excel: Column A: Name + Column B: Address + Column C: City
PDF file name: Formally was called 'Name', Now I want it as Name - Address - City
I would start with the input file & Directory -> formula tool (possibly Column A + " - " + Column B + " - " + Column C?) and the output is a command tool correct? I can't seem to remember how to do this.
Many thanks!
You could use the Blob Input and Blob Output tool to rename PDFs! There would just have to be a way to map the data to the PDFs so the renaming can be done.
Thank you @BS_THE_ANALYST I'll look into the Python Tool.
@alexnajm I just remembered I posted something similar to this a while ago. I'm going to refer to what you said then too!
I haven't used Blob input and output tools so I'll definitely look into them; thanks for the suggestion @alexnajm!
If the Blob tools don't get the job done, I'd use ChatbotGpt and write out what you want executed in a Python script format. It should be able to put that together. Then just drag Python tool on the canvas and insert the script into the Jupyter Notebook.
Hi @JamesJL
Going Waaay back into the DOS days, what you're looking for is a batch file that can rename a series of files. The syntax for this is
ren oldname.pdf newname.pdf
Once you have you new names defined possibly in field called [NewName], use a second formula tool to build up each ren line
'ren "'+[name]+'".pdf "'+[NewName]+'".pdf'
giving you
ren "Mary Smith.pdf" "Mary Smith - 123 Main St - SomeTown.pdf"
Concatenate all these line together using a Summarize and \n as the delimiter. Prefix this with a line to change to your working directory
cd "c:\temp\working directory"
Giving you a final DOS batch file that looks like this
cd "c:\temp\working directory"
ren "Mary Smith.pdf" "Mary Smith - 123 Main St - SomeTown.pdf"
ren "John Jones.pdf" "John Jones - 123 Main St - SomeOtherTown.pdf"
Pass this file to the command tool and you're renames will be done.
Of course the methods mentioned by @BS_THE_ANALYST and @alexnajm will both work as well. The one problem with the Blob tool approach is that it doesn't actually rename the file, but creates a copy leaving the only one behind. This may be or may not acceptable.
Dan
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |