Run Command generating Error Code 255
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
elamp6
7 - Meteor
‎08-09-2021
01:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Labels:
- Labels:
- Error Message
- Run Command
1 REPLY 1
SPetrie
13 - Pulsar
‎08-09-2021
02:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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'
