Hello everyone,
JSL newbie here! I need to Import Multiple Files, where the file names that are imported have some parameters that need to be met.
- Cannot contain certain characters. These characters are always at the end of the file name.
- Must include a certain string
- If there are identical string segments within the file names found, only the one with the most recent system date & time stamp are imported. I need a way to chop up and compare parts of file names.
Ex: I want all fruit smoothie drinks containing “Apple”, but not “Tomato”. (file name, date & time YYYYMMDD HHMM)
Kiwi_Apple_Mango.csv 20220125 1421
Apple_Grape_Kiwi.csv 20220125 1243
Durien_Tomato.csv 20220126 1607
Apple_Grape_Kiwi_Tomato.csv 20220126 1537
Mango_Banana_Durien.csv 20220126 0915
Grape_Pineapple_Apple_Avocado.csv 20220126 0711
Apple_Grape_Kiwi.csv 20220127 1111
The naming of the files does have structure. The string I’m looking for is after multiple delimiters.
Additional asks
- Are there any tips for speeding up the search for these files in a folder where many thousands of files are stored? I can only filter by extension after the initial search. Currently, it takes many minutes to even search and find all the files in this folder.
- Any tips for importing a growing number of files? The number of imported files will likely top 1000 in a few months. All of them have the same data structure. I’m aware I need to “Stack Similar Files”. These are all data tables.
I’ve looked up the functions Words and Munger, but I’m not sure they’re what I need to complete the file import script.
Learning every day!