Don’t you know how many GIF files you’re gonna use for your sketch?
You can use listPaths() and search for “.gif” extension files: