Jump to content

Looping Through Files In A Folder


mhoctober

Recommended Posts

Experts...

I have users upload files (gifs, jpegs etc..) via a form and code that remanes these files, creates a specifically named folder and stores the files therein!

I also have code that can then create

A. a thumbnail and
B. a smaller version of the original file for viewing when the thumbnail is clicked

What I'm missing is code that 'links' the two together.

So - I'm looking for a way to...

1. cycle through all the files in a known folder
2. pass each file to code that creates the thumbnail and reduced file size file - that will create 1 thumbnail and 1 reduced file from each original
3. delete the original files in the folder once 1 & 2 have completed succesfully

Any ideas?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.