I am receiving Error Code 255 when I attempt to run my workflow using the following command:
'cd ' + [directory]+'\ && For %f in (*.xml) do type "%f" >> combined.txt & echo. >> combined.txt'
When I remove the command following the mkdir command, the workflow executes correctly. Does anyone know what I need to change?
I am ultimately trying to concatenate some xml files and output the combined file.
Workflow is attached!
You need to escape the % variable in a batch file.
Update your formula to be
'cd ' + [directory]+'\ && For %%f in (*.xml) do type "%%f" >> combined.txt & echo. >> combined.txt'
Side note, an alternative way to achieve it would be to use
'For /R ' + [directory]+' %%f in (*.xml) do type "%%f" >>' + [directory]+'combined.txt'
Was scouring the community posts to determine the solution to error 255! This worked for me which was great! My cmd syntax is not very extensive but this has helped!
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |