• LOGIN
  • No products in the cart.

DevOps on AWS – Python Scripts 5 : FileSize

FileSize.py

import os
from os.path import join
searchDir = raw_input(‘In which dir do you want search the Files? ‘)
fileExt = raw_input(‘What is the extension of that file?’)
for (dirname, dirs, files) in os.walk(searchDir):
   for filename in files:
       if filename.endswith(fileExt):
           thefile = os.path.join(dirname,filename)
           print os.path.getsize(thefile), ”  –  ” , thefile
February 22, 2021

Contact Address

Rise ‘n’ Shine Technologies:
Third Floor, Plot No1(Part), near KPHB Metro Station, KPHB Bagyanagar Colony, Kukatpally Main road, Balanagar Mandal, Rangareddy Dist-500072

Landmarks : Above VIOLET & PURPLE, near PJR statue, kphb metro station

  8686 98 8042
rnstech.fmw@gmail.com

Location

All rights reserved.
error: Alert: Content is protected !!
X