I need to direct the output files to a directory which must be named at runtime. If the directory does not exist it must be created else use the existing directory. Similarly i need to be able to create output files as well.
Using the modified "create folders" macro from https://community.alteryx.com/t5/Advanced-Analytics/Dynamic-Create-File-Directory/m-p/45217/highligh... by @patrick_digan (modified attached)
I added the Macro Input/Output tools along with configured the Grouping options in the workflow so the records are passed through, and the macro is run once per directory path.
and used the Output tool's options: