Forum Moderators: coopster
I have some large directories (some with nearly 100,000 files in them). They're all images, and I need to do some stuff to them (resize, move etc.)
I am quite sure the number of elements is too large for reading the directory contents into an array and playing with them that way. And since I want to handle each file only once, what I'm looking for is a way to read out maybe the first 250-500 files, manipulate them, then continue with the next 250 and so on. I'd like to do them in batches like this because I'm going to use multi-curl to move them, and I am again pretty sure I can't do a multi-curl request with 100k items all at once.
Is anyone aware of a way to do an iterator with a pointer, so to speak? So I can read X number of items, do something with them, then return to the pointer where I left off and read the next X number of items?
Thanks for any ideas.