Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Run Command Error Interpretation

taxguy33
8 - Asteroid

I always get the error "failed to run external program "%temp%\run.bat": %1 is not a valid Win32 application. (193). " in the attached workflow when my Downloads folder does not have any files in it. Is there anyway for me to change this workflow (maybe within the Run Command tool) to not get an error when there are no files to delete? I'm not totally understanding how the Run Command tool interprets my inputs, but it seems to be working when I need it to delete files.

8 REPLIES 8
benakesh
12 - Quasar

Hi @taxguy33 ,

Windows command to check if file exists 

https://superuser.com/questions/541534/check-whether-a-file-folder-exists-with-cmd-command-line-not-...

 

Alteryx function to check file  : FileExists(Path)

 

Can you delete  only if  file exists ?   

 

taxguy33
8 - Asteroid

@benakesh  Unfortunately that doesn't work for me. The situation I'm trying to solve is when the Directory tool results in 0 files that exist within a folder and thus no records / files move on to the Summary tool or are passed to the Run Command tool. The Run Command tool errors out when there is nothing passed to it.

benakesh
12 - Quasar

Hi @taxguy33 ,

I am familiar with this issue  and  have used dummy  command ( echo )  to solve this problem . 

 

birlaparitosh
5 - Atom

Thanks @benakesh!  This worked like magic!

JokeFun
8 - Asteroid

Hi @benakesh , this is really a very beautiful workflow. Just would like to understand more on the Arguments settings. What does each mean except for %temp%.

 

> %temp%\log.txt 2>&1

 

benakesh
12 - Quasar

@JokeFun  '1' is  Standard out  and '2' is standard error . 2>&1  means  send errors to  standard output  i.e  combine all  messages and output to log.txt.

More details here 

JokeFun
8 - Asteroid

Hi @benakesh , Thank you!

menessert
5 - Atom

@benakesh I am having the same issue, but I could not integrate your solution into mine. Unfortunately, I cannot share my workflow due to work confidentiality. What I did was I replaced the last tool in your workflow with mine and it did not work. Can you explain how this should be integrated into another workflow? Thanks!

Labels