How to copy .csv from multiple locations to one directory where .csv is renamed to the grand parent folder name?

I have some .csv logs I need to consolidate into one folder so that I can quickly access the most recent logs. My source folders are similar to this: C:Program FilesUnique NameLogs. Each folder within Program Files has a unique folder name with a Logs folder containing a time-stamped.csv. I would like to copy the time-stamped.csv from each Logs folder and rename the .csv to the second parent folder name so I know which program the .csv belongs to. Any help is appreciated!

submitted by /u/RiskayBusiness
[link] [comments]

Leave a Reply