To The Point: How to Duplicate and Rename Multiple Files in Alteryx

It can be useful to rename Alteryx files. For example, you might want to do some Regex pattern matching to unify the naming conventions of many files in a folder.

This method will duplicate files (possibly with different file extensions) from a directory to a new directory and with a chosen new filename.

Idea: Use Blob Input and Blob Output to duplicate and rename all files into another folder, regardless of file type.

Method:

  1. Use the Directory tool to get all the file path information for the files you wish to move. We will only need FullPath and FileName from the output of this tool. Note that relative file paths can be used.
  1. Use the Text to Columns tool to split the FileName field on '.' to get the FileName and FileExtension for each file. I used a Formula tool to append '.' before the extension for convenience.
  1. Use a Formula tool (or any other method) to create your New Filename (without the file extension yet). i.e. the new names for the files.
  1. Use another Formula tool (or any other method) to create your New Directory. i.e. the folder you wish to write to. Note that you can have different directories per file, and relative file paths can be used. Also note that if you choose the same folder, the files will duplicate unless the names are identical.
  1. Use a final Formula tool to create your New FullPath which will be the field used to create the files. Make sure it has the full directory (or relative) and the extension starts with a dot.
  1. Add a Blob Input tool to read the files (as a single datapoint of binary data per file, hence ignoring the file type) from the FullPath field. Configure to Modify File Name By: Replacing Entire Path With Field, and Using This Field: FullPath.
  1. Add a Blob Output tool to output the files. The file type will be assigned by the extension we made sure to add in step 5. Configure to Modify File Name By: Replacing Entire Path With Field, and Using This Field: New FullPath. If you have more than one Blob Field, make sure to select the one created in step 6.

Now you can run the flow, and the files will be created in the new folder with the chosen names.

Author:
Jeffrey Brian Thompson
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab