I have a use case where I can't download the zip files. We are reading directly (using Alteryx Designer) from the zip file which has multiple files with same schema (but different data sets). I need to know how we can get the file creation dates of the files that are in the zip file.
If the zip file has 4 'csv' files, how would I get the file creation date and time so that I can figure out which is the oldest file and which is the newest. The Directory tool doesn't work as it will provide me date/time for only the zip file. I actually need the date/time for the files within the zip files.
Appreciate any ideas.
Solved! Go to Solution.
@pankajk - based on my experience the Input tool can only read one csv file at a time from any given zip file (which contains multiple csv files).
In terms of a solution, one approach I can think of is to run a batch command (via Run Command tool) and unzip the zip file into its individual csv components (reference link). Then use the Directory tool to identify the file that suits your criteria and read it. Let us know if this wont work in your case.
Thanks @danilang! I wish I had thought of that solution:)
Thanks @danilang - never used Python before..... do you think you can share a small workflow on how this would work? But seems like a good solution as I am reading the link you provided.
If you take @danilang's awesome suggestion, type zip python in the community search bar at the top, it brings you this this awesome post!
This is a super idea and a great excuse to start playing with the Python tool!