Showing results for 
Search instead for 
Did you mean: 

alteryx server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Run Command on Server using _externals\1\




We have a basic workflow on Server that dynamically identifies the workflow user and uses the Run Command tool to execute a .bat file that pulls back the workflow user's home directory, this "widget" then get used on other larger workflows for outputting results.


Our Server workflows are configured to use the user's credentials, not a Server service account. The Run Command tool's Write, Run, Working Directory and Read location are all currently set to a location in the Server environment accessible by all users, to allow dynamic .bat file write, read, etc.


This works fine and gives us the required result. What I am conscious of though is using the same location each time may cause a conflict if two workflows using this widget are run at the same time. Therefore, I wanted to use the Server's relative _externals\1\ file paths instead but here I ran into a problem. While the dynamic .bat file is successfully written to a temp _externals\1\, the Run action does not pick the .bat file up from the same location, causing the error below.


Does anyone know how to resolve this, or do they have another way to utilise temp folders and avoid a potential conflict?


Many thanks,




01-08-2019 10-24-30.png




Instead of using _externals have the bat file created and executed from the same directory as the workflow when you're building it. When you upload it into the server environment, the bat file will be created in the "staging" directory that gets created for the purpose of the execution and you will reference it as the below in the Run Command tool.


I hope that makes sense.




Hi @MichalM 


Thanks for the suggestion, that works great.


Just a small cosmetic point though, is there a way to prevent the .bat file from being output to the Server result page (see image), just so users don't download it.


Thanks for your help.




01-08-2019 11-00-42.png



You can disable the output via the Interface Designer




Hi @MichalM 

01-08-2019 12-59-46.png

It looks like the .bat file is not actually an output file option in the Interface properties box. I unticked the available output tools in any case to test and there was no difference in the Server output.


Any ideas.




Hi @MichalM 


I have posted another thread for the Server Output issue as we have not found a way to suppress this .bat file output.