Electron microscopy
 
(Find) File Size/Find the Largest File in a Directory/Folder
- Python for Integrated Circuits -
- An Online Book -
Python for Integrated Circuits                                                                                   http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

Find the size of a file: Code:         
          Check if file exists or not, and then open it if there is
Output:         
         Check if file exists or not, and then open it if there is         

============================================

Find the largest file in a directory and its subfolder. Code:         
          Check if file exists or not, and then open it if there is
Input:         
         Check if file exists or not, and then open it if there is
         Check if file exists or not, and then open it if there is         
Output:         
         Check if file exists or not, and then open it if there is         

============================================

Find the largest file in a directory and its subfolder. Code:         
          Check if file exists or not, and then open it if there is
Input:         
         Check if file exists or not, and then open it if there is
         Check if file exists or not, and then open it if there is         
Output:         
         Check if file exists or not, and then open it if there is

============================================

Find the largest file in the current directory only. Code:         
          Check if file exists or not, and then open it if there is
Input:         
         Check if file exists or not, and then open it if there is
         Check if file exists or not, and then open it if there is         
Output:         
         Check if file exists or not, and then open it if there is

============================================

Find the smallest file in the current directory only. Code:         
          Check if file exists or not, and then open it if there is
Input:         
         Check if file exists or not, and then open it if there is
         Check if file exists or not, and then open it if there is         
Output:         
         Check if file exists or not, and then open it if there is

============================================

Find the largest and second largest files in the direct folder only. Code:         
          Check if file exists or not, and then open it if there is
Input:         
         Check if file exists or not, and then open it if there is
         Check if file exists or not, and then open it if there is         
Output:         
         Check if file exists or not, and then open it if there is


         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 

 

 

 

 

 

=================================================================================