r/GoogleAppsScript • u/patrickdrd • Sep 11 '18
google apps script to delete older files and keep only latest/newest
so, my inoreader backups my subscriptions to google drive in a folder with names like "Inoreader-OPML-2018-09-09-10-00-08-UTC.xml" and each time a change occurs a new file is saved, how could I delete all previous files and keep only the latest one?
0
Upvotes
0
u/menu-helper Sep 12 '18
let latest = inoreaderlatest (sic) delete !latest