Disclaimer: This macro was based on CReW Wildcard Input Macro from CReW Macros set and is in no way related with or quality checked by CReW team.
Credits for original CReW Wildcard Input Macro:
Macro Author: Ned Harding
Macro Layout and Annotation: Adam Riley
While this enhanced version of the Wildcard Input Macro named CSV Friendly Multi-Input was not built by CReW team, the macro file structure was built in a way similar to CReW Macro tools for easy integration with existing CReW Macros.
Recommended installation path:
1. Download and install CReW Macros following the instructions on this page.
2. Download this macro set (YXZP file).
3. After importing the YXZP package in a location you choose, move its contents (excluding testdelimiter.csv into the Macros folder of the CReW Macros installation directory where other macros (.yxmc and .yxmcbatch files) are also found.
Differences from original version:
1. Still supports wildcard data processing with a focus on configuration of the text files (only CSV and TXT extensions are supported for text files).
2. Automatically detects the delimiter character (should work successfully for 90% of the text files containing only Latin alphabet characters) for each individual file with CSV or TXT extension (supporting macro for this feature [CReW_AutoDelimiterDetection.yxmcbatch] was built by me ("CReW_" prefix was added only for file sorting convenience) and has no documentation, please open the supporting macro to see additional notes).
3. Outputs file name as field by default.
4. Adds a AYX_CFMI_RecordID field that resets for each FileName.
5. Allows users to specify the Ignore Delimiters in Quotes setting (None by default, applies to all text files).
6. Allows users to specify a code page (Unicode UTF-8 by default, applies to all text files).
7. Allows users to optionally specify a Dynamic Rename formula which is individually applied to all input files.
Update (2024-06-28): The batch macro that automatically detects the delimiter was updated to account for delimiter mismatch, especially when space characters equal or surpass the actual delimiter character while still allowing the space character to be properly detected as a delimiter, based on this link provided in this discussion.
Update (2024-07-01): Provided an option to use the previous RegEx pattern for delimiter detection, named as "Prioritize space over other delimiters".