Process Directory Script

Process directory is used to display the files and character count at file from inside of directory.

Demo :



Text   File Name :
   
 File Type
 
Test
       
									
     
         

Example :

In the above demo if you create file, display the file name and inside of character count at file.

Code :

Following code is use to process directory script if you need code to copy and use to your website.


<?php
  $dir = " ";
  $fileList = scandir($dir) or die ("Not a directory");
  foreach ($fileList as $file)
  {
    if (is_file("$dir/$file") && $file != '.' && $file != '..')
    {
       echo "$file: " . filesize("$dir/$file") . "\n";
    }
  }
?>

In the $dir variable is used to assign file path and $fileList variable is used to a directory scan from file path and next step if file is exists is display the file and file size and character.

Free Download Script :

If you need to process directory script click and download from following link.

Download




Content