I have a small test workflow to move file from 1 folder to another and it runs forever. I test cmd string on Command Prompt and the file is moved but it keeps running on on Alteryx. Here is my set up. What could I be missing?
I do this all the time, but my preferred syntax is using robocopy and the /mov command:
Others have also posted that their Run Command never ends. In most cases that is because they are shoving the command syntax into the run command tool once for every row of the data. Not saying this is what's going on for you, but make sure you are only sending that "CMD" string to the run command tool once and NOT once for every row of your data.
Let me know if that helps, -Jay
Try changing your Output File Format to .flat
You had it set to .csv which is not going to work.
Also, to simplify your Run Command tool setup, you can just have the "program" drop to a temp location using %temp% instead of the full file path. That way, once it's done, its purged.
The two check boxes make it so the CMD prompt window doesn't show. It runs in the background instead:
I follow your cmd string and I got this error. I try with the old directory of bat and also update %temp% but it returns same error Error: Run Command (12): \MovingFiles.bat" returned an error code: 1
can you attach your workflow so I can see how you've configured your run command tool? -Jay
Yes here is the workflow
I initially saved as flat file but I got error cmd column is too big for a flat file. Then I changed to csv based on some suggestions.
reduce the field length. The command can't have too large of characters:
@thaodinh9 Please find the workflow for reference; this should help.
@thaodinh9 were you able to resolve this need? If so, please mark response(s) as solution so it can be closed for other's reference. -Jay