Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1808926
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:21:30+00:00 2026-05-17T06:21:30+00:00

How to process files inside the folder sub directories using php script. Actually I

  • 0

How to process files inside the folder sub directories using php script.
Actually I want the image files inside each sub directories residing in my server itself to process and save to another location and save the folder name & file name in the database. Can anyone help and give a sample script on how to operate this…

the folder structure may be something like this

parent folder
 sub-folder1
   img1
   img2
   img3
   .
   .
   img'n'
 sub-folder2
   img1
   img2
   img3
   .
   .
   img'n'
 sub-folder3
   img1
   img2
   img3
   .
   .
   img'n'
 .
 .
 .
 sub-folder'n'

Also if on the process of copying and writing to database how can show a progress bar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T06:21:31+00:00Added an answer on May 17, 2026 at 6:21 am

    u can use this function to copy a folder including its subfolders from source to target.

    function fullCopy( $source, $target ) {
        if ( is_dir( $source ) ) {
                $d = dir( $source );
                while ( FALSE !== ( $entry = $d->read() ) ) {
                        if ( $entry == '.' || $entry == '..' ) {
                                continue;
                        }
                        $Entry = $source . '/' . $entry; 
                        if ( is_dir( $Entry ) ) {
                                @mkdir( $Entry );
                                fullCopy( $Entry, $target . '/' . $entry );
                                continue;
                        }
                        copy( $Entry, $target . '/' . $entry );
                }
    
                $d->close();
        }else {
                copy( $source, $target );
        }
    }
    

    inside the loop u can execute a query to save file names to the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently using some configuration files from several project modules inside batch script(scriptx.sh) which
I'm trying to add extra validation to jdpl process-definition files using XSD. We have
I have a folder with a large amount of files inside of it. I
I want to call a compiler (nonstandard) located in a folder inside my Java
I am trying to process files one at a time that are stored over
Thinking about a Windows-hosted build process that will periodically drop files to disk to
I have a directory to which a process uploads some .pdf files. This process
I'm trying to construct a find command to process a bunch of files in
I want to upload and then process a file in a Ruby on Rails
here is the input i am getting from my flash file process.php?Q2=898&Aa=Grade1&Tim=0%3A0%3A12&Q1=908&Bb=lkj&Q4=jhj&Q3=08&Cc=North%20America&Q0=1 and in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.