1

I need to zip files from a directory, but not all the files in the directory. I determine the files that need to be zipped by running a query on the directory listing.

Currently, I'm looping over the query results to add each file to the archive individually, but this can take a while in a large directory.

Is there any way to do this outside of a loop? I couldn't find anything in the CF docs that would indicate that you can pass some sort of list to cfzip.

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Sean Walsh
  • 8,266
  • 3
  • 30
  • 38

1 Answers1

1

Unfortunately, no. You can pass it an entire directory to zip up, but not a query of files.

Dan Short
  • 9,598
  • 2
  • 28
  • 53
  • 1
    Appreciate it - I found that it was faster to copy the files to a temp directory and then zip that directory rather than calling `cfzip` 100+ times in a loop. Still, would have been nice to pass the list directly... – Sean Walsh Apr 23 '11 at 20:18