Replicate a file multiple times, saving with different names
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I'm trying to replicate a file that is being used for one entity for multiple entities.
One of the sheets has a column with 35x rows for each entity. How can I loop through that sheet (or a list), but replicate the whole file for each of the names on that sheet/list.
My old VBA brain says something along the lines of: for i = 1 to 49, duplicate whole file, save as i.xlsx. Is it something easy to put together?!
Thanks in advance.
Solved! Go to Solution.
- Labels:
- Best Practices
- Output
- Tips and Tricks
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @gzzaniol,
You can check this article on how to copy/move files with alteryx:
https://tarsolutions.co.uk/blog/move-or-copy-files-in-alteryx/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @gzzaniol
Here is a mockup of how you can do it.
I'm reading in the file I want to duplicate with the Directory Tool, Appending the list of file names to the set, generating the Script to be run, and the using the Run Command tool.
Here is how I have my folders setup:
When ran successfully, this mockup will duplicate and rename the file 10 times in the Output Folder.
If this solves your issue please mark the answer as correct, if not let me know!
Thanks!
Phil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks guys. I'll give it a shot later today and will keep you posted. Really appreciate the support of the community!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks. It worked nicely and saved me a couple hours.
Really appreciate it.
Best,
GZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Maskell
When i ruin your code, it shows the error 1 at the run command, could you suggest why it is showing that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@tsingh4 - Can you share a screenshot of the error and how you have the run command configured?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Maskell,
It runs like that:
But if you try it in the other files it work properly.
Thank you so much for your solution!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Amazing! Thank you for sharing this.
