I would like to rename each image with 10 digits of numbers.
For example:
For those images, I would like to rename as: 0000000001.png,0000000002.png, and 0000000003.png.
This is the reference for coding: http://askubuntu.com/questions/473236/renaming-hundreds-of-files-at-once-for-proper-sorting.
I am wondering if I can use Alteryx to rename those images.
Sincerely,
Kazumi
In the attached workflow, it uses a Directory toll to get the contents of a folder, then a formula tool to generate the new file name, and construct the command:
New FileName:
PadLeft([FileName], 14, "0")
Code:
'ren "'+[Directory]+[FileName]+'" "'+[New FileName]+'"echo '+[FileName]+','+[New FileName]
it then unions the text "echo off" to be the first record, Selects on the Code field, uses the Run Command tool to execute the generated commands, reads back in the list of name changes.
If your "No image" image is called 0.jpg and is in the same directory as all the other images (with filename 1.jpg, 2.jpg, 3.jpg), and you have tour data source will a list of expected IDs:
000000000100000000020000000003000000000400000000050000000006
then the attached workflow will rename the three known files, and copy/rename 0.jpg into the other three expected filenames.
Hi @Joe_Mako,
It worked! Thank you!
I have a follow-up question:
I have an excel file which includes bulk of unique IDs (over 97,000 unique IDs).
Since those unique IDs do not have matched images, I would like to connect these unique IDs with "No Image Available" image below:
The disired result would be like this:
Do you think there is a way to do this using Alteryx?
Thank you,