Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Deleting files

neelxp
5 - Atom

I currently have a macro that deletes files from a specific shared drive location/folder as directed in the macro. However, now I am trying to find a way to do something similar for a shared drive where it deletes XLS files older than a certain age regardless of the actual folder path. The idea would be to have this in one workflow so it sweeps the shared drive to delete these files every month or so. Is there a way this can be done without having to incorporate the initial macro and having to re-point it and include it within each current workflow on the gallery? Thank you

1 REPLY 1
Prometheus
12 - Quasar

@neelxp You can use the Directory tool and map it to the parent folder of every folder that may contain a file you want to delete. Configure it to look only for XLS files. Check the box next to "Include Subdirectories." Use the Sort tool to sort on CreationTime and then put that into your macro to delete those files. I guess I don't have to tell you to be careful with deleting files, but I thought I would just say lol. Be careful. :)

Labels