Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Moving Processed Input Files within a Workflow

TeePee
8 - Asteroid

Hello!

 

This is my first question to the community.  Hoping someone can help.

 

On a daily basis we receive a “new data” xlsx file (always with a different filename) which is saved into a folder called “Raw”.

 

Once a week or so, we run an Alteryx process which:

  • Inputs all the xlsx files in the “Raw” folder, (so usually about 7 files)
  • Processes them
  • Then finally appends the new data to Sheet1 in a file called “Master.xlsx”

 

The “new data” xlsx files need to be moved from “Raw” to a folder called “Processed” immediately AFTER they’ve been added to Master.xlsx but BEFORE the workflow ends to ensure all the new data files are processed and added to the master once and only once. 

 

I don’t mind if this happens to each file in turn ie

  • new data file 1: ADD to master THEN MOVE;
  • new data file 2: ADD to master THEN MOVE;
  • new data file 3: ADD to master THEN MOVE etc

OR if the add/move happen in a lump ie

  • ALL new data files: ADD to master
  • THEN ALL new data files: MOVE

 

Does anyone know how (if!) I can achieve this please?  I’m a complete Alteryx novice, so although I’ve seen similar questions asked eg…

https://community.alteryx.com/t5/Data-Preparation-Blending/Copying-multiple-text-files-from-one-fold... 

https://community.alteryx.com/t5/Setup-Configuration/Configure-Run-Command-tool-to-move-a-file/m-p/1...

https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Batch-Files-in-Alteryx-Part-2-Moving-Files/t...

…I am confused by which technique best suits my needs and how to tweak it.   

 

The data are confidential, but I’ve attached illustrative "Master" and "new data" xlsx files. 

 

Again, thanks so much for your kind help.

 

12 REPLIES 12
tom_montpool
12 - Quasar

When we need to do something similar on a network drive, cmd.exe and .bat files don't seem to work so we've switched over to using Powershell and .ps1 scripts. A trick with Powershell is that it may not be set up initially in a way that allows you to run scripts, so you may need to have your IT department check your execution policy (with Get-ExecutionPolicy) and set it (with Set-ExecutionPolicy).

 

Instead of running a .bat file with cmd.exe, you would run a .ps1 script with powershell.exe...and you would need to use proper powershell syntax in the .ps1 script.

 

A lot of basic powershell syntax can be found by using the "get-help" command with a keyword like "move" -- so typing "get-help move" at the powershell prompt will give you the help for the move-item command.

ndooley
5 - Atom

Thanks for the quick response, we'll give it a shot!

NabilA
6 - Meteoroid

Thanks for the suggestion. This solution still works in 2021

Labels