This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Apologies in advance if this is an obvious one, my brain is a small bit fried.
I have a directory of similarly named files (think bookings.csv), and I want to do one or both of the following:
1. Add a column within each of the files in the Directory showing the creation time for that specific file so that I can use this information to differentiate age of records within a larger input of all of the files.
2. Rename each of the files within the Directory with its individual Creation time (for same reasons as above).
I've had a go at doing this using Dynamic Input, formula tool, append...........I'm just not getting the right outcome.
Can someone point me in the right direction?
If it's useful, the reason I want to do this is to take the latest information for each customer booking across all the files. These are .csv files exported weekly from an in-house system by someone else, and I need to use it to create an overall picture of bookings over a specified period of months. I can't unfortunately just use the latest file, as when bookings are completed, they get removed from the system prior to export.
Thanks for the quick response! I'm not sure if I'm just being stupid, but I want to take the Creation Time column from the Directory Input and add the creation time for each file as a field within that specific file.
e.g. for bookings1.csv, I would want to add the CreationTime for bookings1.csv as a field within bookings1.csv.
Absolutely doable - when you are reading the file, check the option "Output file name as field"; bring the directory tool and get the 'Creation date' and 'fullpath' and join the 'filename' from input file to 'fullpath' from directory tool and you have the data with creation date. High level screen shot and output: