Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Copy Folder on the Same Drive and Rename

KamenRider
11 - Bolide

Hi,

I’m seeking assistance with a workflow requirement for Alteryx Designer, which will also be deployed on Alteryx Server. Since the Run Command tool isn’t suitable for server execution, I’d appreciate guidance on building a workflow that meets the following criteria:

 

Requirements:

 

1. Folder Naming: Each folder is named by business date in the format YYYYMMDD.


2. Latest Date Selection & Copy: The workflow should identify the folder with the latest date and copy its contents. When copied manually, the file is named with the date and “- copy” (e.g., “20250918 - copy”). This process should run daily, except on Saturdays and Sundays.

 

3. Note that the folder contains number of folders and files around 4 gig all in all.


4. Renaming: After copying, the file should be renamed to today’s date in the same format (e.g., “20250919”). The workflow runs around 2:30pm EST, so it should determine the next business date accordingly.


5. Email Notification: Once the renaming is complete, an email notification should be sent confirming the process is finished.
I’ve attached a sample set of folders. The workflow should copy everything found inside the latest date folder.

Thank you in advance for your help!

 

Kamen

7 REPLIES 7
jrlindem
11 - Bolide

@KamenRider 

First off, the run command tool does work on Server.  What do you mean by “isn’t suitable” in this case?

 

Responses to Requirements:

 

  1. Do the folders already exist or are you needing to create them dynamically?  If they exist you can account for them using formulas to target the correct folders.  If they do not, the run command tool is the best way to create the directories based on the data from your workflow.
  2. Same here, using formulas to specify which folder you’re after is the easiest method
  3. No issue with volume or quantity since you can target the folders (not having to worry about sifting through them).  File size shouldn’t be a concern either.

 

Let’s take a break for a moment and talk about the files.

 

  • Are you using a template to create the outputs?  If so, use the BLOB tool to take the template, rename it, and then place it in your desired location.  You could also use the Run-Command tool to do this, but BLOB is better

 

  1. Renaming your file can/should happen within the workflow.  You can specify the output location and name dynamically using formulas to create the path and name.  You can also account for the date to use in your formula based on when you specify it to run.
  2. Once all the above is done, using a Block-Until-Done or Control-Container you can send an email notifying the job is done and the file is available at “x” location

 

Let me know if I can further explain any of the above pieces, but what you’re trying to accomplish is very doable.

 

Hope that helps,  -Jay

KamenRider
11 - Bolide

Hi @jrlindem 

 

The company restricted us from using the command tool as part of the workflow in running in the server for some reasons, not quite sure.

 

Response to Requirements

 

The folders exist. We need to locate the latest date and copy it. Then when completed, rename it on the next business date. Example, if the latest date is 20250918, the new file should be 20250919.  As said, we are not allowed to use the run command tool.

 

Can you help me how to create a workflow using BLOB? Just to remind that are copying a folder and not files. I saw a BLOB sample but it is only copying files and not the folder itself.

 

Hope you can send me your workflow idea / sample for my reference.

 

Thanks.

Kamen

 

 

 

 

jrlindem
11 - Bolide

 

@KamenRider Ah, I see.  That's unfortunate that your company has prohibited the run-command tool as it is very useful.  You are also right that BLOB is only for handling of files.  Apologies if I misinterpreted the need.

From my experience, and others can chime in here, the only ways that you can create a directory path from within your workflow is either:

  • Run Command
  • Python Tool
  • R Tool

 

I have not personally done this with the python or R tools as I have access to Run-Command.  Do you know if your organization permits the use of Python/R tool?  I'm going to guess not if they are hesitant to allow Run-Command.  But this is my understanding of the only ways to dynamically create new folder paths for files to be placed into.

-Jay

dreldrel
8 - Asteroid

If the run command tool is not suitable, you may need to python or R tools to achieve your requirement. But you'd need to check if your company also block those tools..

jrlindem
11 - Bolide

Thanks @dreldrel ; this is exactly what my previous post indicated.  Was there something more specific you had to contribute to the solution?  Otherwise, adding extra comments indicating the same is just noise and unnecessary.

 

Cheers,  -Jay

KamenRider
11 - Bolide

Hi Alteryx Community,

 

First of all thank you for the responses. Anyone who could help me provide samples like workflow on how to do it?

 

Looking forward for your help and assistance.

 

Kamen

OllieClarke
16 - Nebula
16 - Nebula

Hi @KamenRider 

As @jrlindem said, the only way to create or edit folders with Alteryx is to use Run Command, Python or R tools. As Run Command is blocked, we're assuming R and Python are too.

However, if the destination folders already exist, then you can use blob input and blob output tools to effectively copy the files within the source folder (by reading them all in, and then writing them out to the new destination). Not strictly copying a directory, but you only care about the files within the directory...

If the destination folders don't already exist, and you're not allowed Run command/Python/R, then you'll need another process to create them, at which point you might as well use that process to copy the files...

Labels
Top Solution Authors