Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Rename and Move Files after Processing - Run Command Error

kpreddypadira
6 - Meteoroid

Hello, 

 

This is my first stint with the "Run command" tool and am new to working with .bat files too. I would really appreciate if someone could help me understand the reason for this error. 

 

The objective of this workflow is to consume n number of excel files, append them, rename and move them to another folder.

The workflow works if I try to just move or just rename the files, but fails when I try to do both. I get an 'Error Code 1' on the Run Command tool.

I tried to separating them and triggering the other workflow from 'Events' but got an 'Access denied' error. A quick google search and I realized maybe it was a license issue.

 

Also, when I rename the '.xlsx' file, it becomes unusable.

 

I am attaching the sample workflow I have been working on. Please advise.

 

Thank you

Pratheek

2 REPLIES 2
DavidP
17 - Castor
17 - Castor

Hi @kpreddypadira 

 

The configuration of your Run Command tool looks suspiciously familiar 🙂

 

Error code 1 means that the dos command you're creating has a syntax error in it. 

 

My suggestion is that you copy the output of your [cmd] field after the summarize tool to a Run Command window an run it from there to see what the error is.

 

My most common mistake with these commands is that if the path or filename has a space in it, you have to put the whole path and filename in double quotes, like this:

 

COPY "C:\Location 1\file1.ext" "C:\Location 2\file2.ext"

 

If you want to include multiple commands in a single line, separate them with " & "

 

bur if you look at your cmd field in a command window you should be able to figure out what's wrong with it.

kpreddypadira
6 - Meteoroid

Thank you for that answer.

 

Honestly, I have no idea how it is working this morning.

 

I did rewrite the Formula tool, the cmd block and it works like a charm. Maybe it was the extra spacing. 

 

Thanks again.

Labels
Top Solution Authors