Upgrading Server to version 22.1? We’ve enabled the faster AMP engine by default. Read about how these system settings changes might affect you.

2022-05-24 Updates: Login: If you are facing issues with logging in, please try clearing all your cookies or trying another browser. We have a fix being deployed on the evening of 5/25. Email: If you're not seeing emails be delivered from the Community, please check your spam and mark the Community emails as not junk. Thank you for your patience.

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
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.

7 REPLIES 7
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!

Labels