Help with Filepaths

I am trying to import files based on the most recent ctime of files/ folders. All of my folders are uniformly named and structured.

Desktop > Metrics Folder > Most Recent Year Folder > Most Recent Month Folder > Load All .xlsx Files in Folder

Could someone please assist me in what this should look like?

Thanks in advance

1 Like

Start with looking at list.files function, see help to get details. There's also file.info function which can help in getting creation/modification time of files.

To check files in different locations you can use lapply or for loop. Create a list of locations before or a pattern you can iterate over.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.