As part of some consulting work, I had to extract documents out of a large zip file. The zip file contained thousands of documents and EACH individual document resided in a directory structure nested 6 to 11 other directories deep. Doing this by hand would be tedious and boring.
Also, the individual files were named with punctuation, spaces and other annoying bits. I wanted to clean those up as well.
I spent a few minutes hacking together a ColdFusion script to do the work for me.
Here is the code:
SELECT * FROM dirQuery
WHERE TYPE<>'Dir'
There, wasn’t that fun?