Visit Sponsor

Written by 2:41 pm ColdFusion

Pulling documents out of nested folders

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?

Visited 2,469 times, 1 visit(s) today
[mc4wp_form id="5878"]
Close