I've gone through every official explanation, community forum post, and stackoverflow thread that I can find, and so far nothing has worked.
The basic idea is that with a specific input format the macro will build and run a windows batch command to do some basic file movement, copying, renaming, that sort of thing. It's intended for someone to stick it into another workflow so that when they are trying to use files on their computer then they can do things to those without having to know batch command syntax or do the things manually.
You'll find attached the workflow of the macro. It's configured to test the "Copy" command with a source location and filename, a destination location and file name, and a flag to prepend the modification date to the file name during the copy process. It uses a python script to take the input, build the command, and spit it out again. You can ignore the rest of the code there because the only thing that is pertinent for the test is the section for the "copy" command.
The trouble is that it only sort of works right. If I output to a .csv file, copy the command, and then run it in a command window (with appropriate adjustments for the "%" signs) then it works fine. You can check this by disabling the "Run Command" container (37) and enabling the .csv output container (35). Then just run the macro by itself, open up the .csv file that it creates, copy the command, put in a command window, and run (after you've adjusted the "%" signs so that you can run in that window instead of through the .bat file). Just make sure you have the appropriately name text file in your C: drive location.
The trouble arises when I disable the .csv container (35) and enable the run command container (37). What I expect that to do is to write the command to a .bat file in the temp directory and the run that .bat file. What I get instead is an error message that, apart from the exact name of the temp directory, is exactly the same as the following.
Run Command (38) The external program "C:\Alteryx-Temp\Engine_8308_d9ee159f71db604cb828bc0301c82bd6_\RunCommand.bat" returned an error code: 1
As I said above, I've gone through every official explanation, community forum post, and stackoverflow thread that I can find, and so far nothing has worked.
Can you get this batch file to run? What did you do to make that happen?