This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 03-15-2016 04:58 PM - edited on 07-27-2021 11:43 PM by APIUserOpsDM
One of the many great things about Alteryx is how it can assist the user in organizing their data not only within the tool, but outside of the tool as well. In this series we will show you how to rename, move, and delete input files that you use in your Alteryx Workflows. You will create batch files with Alteryx that you will later be able to use in a workflow that runs the file. This will give you the ability to stay organized as to what you have run through the workflow.
The first one we will go over is Renaming Spreadsheets.
Renaming Files
Creating the Batch file workflows:
Tools needed in order of use: (1)Directory Input, (2)Select, (3)Formula, (4)Summarize, (5)Output Tools.
Directory Tool (1) –
Select Tool (2) –
Formula Tool (3) – Output Fields Created: New File Name, Command, and Batch File.
Replace(left([FileName],findstring([FileName],'.'))+' '+tostring(DateTimeNow())+'.xlsx',':','-')
'Rename '+ '"'+[FullPath]+ '"'+ ' ' + + '"'+[New File Name]+ '"'
[Directory]+'rename_files.bat'
Summarize Tool (4)–
Output Tool (5) –
Adding Batch File to Your Workflow:
The last step is to add this batch file to the Events tab in a Workflow that you want to move the file or files you have chosen in the .bat file in the Configuration window:
I've recreated this and received the following error,
Error running Event #1: The external program
"C:\Users\my.name\Desktop\test.bat" returned an error code:1: The specified image file did not contain a resource section. (1812)
Has anyone else experienced this and found a workaround?
@SamuelKr please see this post with the same error https://community.alteryx.com/t5/Advanced-Analytics/Guide-to-Creating-Your-Own-Connector-Handling-Er.... If the resolution does not help, please post back to that thread for the users to assist.
Hello
I received this error for the command 'Command was truncated' where it cuts off part of the destination filepath along with the destination file name. I have tried changed the type of field and the length, but still having this issue.
The wf does work when I use a short filepath - such as my C: drive - but I need to copy the file from a network location to another network location.
Any help with this would be great!
Tammy