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.
Solved! Go to Solution.
Hi @taxguy33 ,
Windows command to check if file exists
Alteryx function to check file : FileExists(Path)
Can you delete only if file exists ?
@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.
Hi @taxguy33 ,
I am familiar with this issue and have used dummy command ( echo ) to solve this problem .
Thanks @benakesh! This worked like magic!
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
Hi @benakesh , Thank you!
@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!