Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Configuration in Run Command Tools

tamluenwai29
8 - Asteroid

Hi All, 

 

I have an Alteryx workflow that contains Run Command Tools.

 

However, it will automatically pop-up a Windows cmd.exe interface when the workflow runs to the run command tool, which asks me "Would you like to replace the existing file?". 

 

I have to enter "Y” a couple of times in the pop-up Windows cmd.exe interface to proceed the remaining part of the workflow.

 

Therefore, I would like to know, whether Alteryx can finish the above manual action. So, the workflow can be run automatically.

 

Thanks all of you.

I have attached the cmd.exe windows and the configuration of run command tools in this post below.圖片2.png圖片3.png

9 REPLIES 9
OTrieger
12 - Quasar

@tamluenwai29 
It will be much easier to ensure that the folder is empty or that you are writing out the data to a different folder.

tamluenwai29
8 - Asteroid

Hi

 

Could you give me some insight for writing out the data to different folder? 

But I am still want to know how to solve the problems that I mentioned in this post! Thanks a lot !

SPetrie
13 - Pulsar

What command are you running that prompts the window? Those commands usually have switch parameters you can add to force overwrite such as -Y or /Y etc. It may be beneficial to lookup what options are available for you command and add them in.

tamluenwai29
8 - Asteroid

Hi @SPetrie, after 2 weeks, I still haven't figured out how to do this. Could you give me some help for this problem?

Attached the sample workflow and dummy data in this reply down below.

 

Set Up Cmd:

pushd "%~dp0"

mkdir Extract

pushd Extract

 

Post Cmd:

popd

dir /B Extract > ziplist.txt

popd

螢幕擷取畫面 2024-10-15 105439.png

 

Run Command Tool Configuration: 

螢幕擷取畫面 2024-10-15 105553.png

flying008
15 - Aurora

Hi, @tamluenwai29 

 

You can try change your code part , from 

"C:\Program Files\7-Zip\7z.exe" e "C:\Program Data\Alteryx\***.zip"

to 

"C:\Program Files\7-Zip\7z.exe" e -y "C:\Program Data\Alteryx\***.zip"

tamluenwai29
8 - Asteroid

@flying008 

Hi, after adding the "-y" in the formula tools, the windows pop-up screen is solved.

However, there is no data returned. Could you give me some insight?

螢幕擷取畫面 2024-10-15 121553.png

apathetichell
19 - Altair

Have you tried the -y flag with the 7zip command line?

flying008
15 - Aurora

Hi, @tamluenwai29 

 

There is 'e -y' 'have a space between 'e' and '-y', not as your write 'e-y', you can also change the code to "C:\Program Files\7-Zip\7z.exe" e  "C:\Program Data\Alteryx\***.zip" -y

tamluenwai29
8 - Asteroid

@flying008 

Thanks so much! it works!!

Labels