I am unable to identify the latest subfolder's date from the a folder which has many subfolders under it.
/abc/data_files/ - Main folder path
it has subfolders namely :
df_jun_2021
df_jul_2021
df_Aug_2021
Here I need to dynamically pull the date updated/ created of the df_Aug_2021 subfolder.
Everything a new subfolder gets created in the main folder /abc/data_files/
Any solution is much appreciated.
Referring to https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Directory-Tool-Folders-Only-amp-Sub-fo... would provide a macro and how to extract the subdirectory data.
Minor tweaks would be required in the macro so as to incorporate the "LastAccessTime" of the subfolder. Make sure to make the changes in all the summarize and cross tab tools in the macro. You will then be able to get the last access time of each of the subfolders and perform further data operations. Hope this helps! Do let me know in case you have any more questions. happy to help!
You can use the Directory tool to get a list of all files, then use Formula tool(s) with functions like FileGetDir (to get the folder name) and Switch (to convert Jun, Jul to numbers), and Text to Columns to split the folder names into 3 fields, and Summarize to get a list of unique folder names.
The Directory tool won't return the names of empty folders.
See this post to get all folder names: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Help-reading-folder-names-not-file-nam...
Chris