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.
I have users that wanted a macro that simply takes all files of one type (e.g., xlsx, csv, yxdb) and simply copies them from one folder to another (for backup, as you mentioned).
I created this simple macro for them. Enter the "from" location, the file type, and the "to" location, and it will do just that. Every time it runs, in addition to copying the files, it creates a simple text file in the "to" folder that tells the date and time the copy was completed (that way if you schedule it you can always check to see when the last update was, although if it's scheduled you should already know, but hey, you have to output something, so why not this).
It's something I created for my specific use case. I've tried attaching it to this post in case it suits your needs as well, but I am unable. Keep getting the error "The contents of the attachment doesn't match its file type.".
You can zoom in and probably re-create it yourself without too much trouble.
If you open the YXMD I attached, in Alteryx Designer, you will see one tool sitting there on the canvas. This tool is the macro that will copy your files. If you right click on that tool and choose open macro, then a new canvas will open and show you the "innards" of the macro, which is what my original screen shot above is. If you simply click on the tool, you will see in the configuration tab instructions on where to enter what.
I have opened the YXMD1 workflow and I see the macro. I am unable to right click and see the option of open macro. I do not think I need to know the innards. When I click on the macro I see the configuration scripts but I am unable to get pat the entry point is invalid error. I have tried different input data points and entering data into the config script.