How to find the Size of a Folder &also list the sub folder and files in it

In my program I want to know the size of a folder . The input given is the path of the folder and the ouptut should be the list of files and subfolders with their size. What is the function we have to use for this?
Thank you

class: file
method: listFiles() - list all files of the dir referenced by the file object
method: length() - give the size of the file referenced by the file object ; you have to call this method on all file of the dir to make the sum and have the dir size

Similar Messages

  • Command for "How to find Cursor Size" in Oracle Stored Procedure"

    Hi
    Can u tell me....
    How to find Cursor Size" in Oracle Stored Procedure........
    I want command for that........

    why don't you try select count(*) from your_table;That requires running the same query twice - or rather running two different queries twice. Besides it still doesn't guarantee anything, because Oracle's read consistency model only applies at the statement level (unless you're running in a serialized transaction).
    This is such a common requirement - users are wont to say "well Google does it" - it seems bizarre that Oracle cannot do it. The truth is that that Google cheats. Firstly it guesses the number on the basis of information in its indexes and refines the estimate as pages are returned. Secondly, Google is under no onus to kepp all its data and indexes synchronized - two simultaneous and identical queries which touch different Google servers can return different results. Oracle Text works the same way, which is why we can get a count with CTX_QUERY.COUNT_HITS in estimate mode.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com
    .

  • How to change the size of a particular object in the picture?

    How to change the size of a particular object in the picture?

    You need to select it.  Copy that selection to a new layer, and use Free Transform to resize it.
    http://www.youtube.com/watch?v=qWpAGmwhllQ
    http://www.youtube.com/watch?v=Bi4jJnYLkUA

  • HT1229 How do I reduce the size of photo in iPhoto?  The size of my imported photos are 2 - 3 MB and for my purpose I need 200 - 400 KB.  Any suggestions appreciated.

    How do I reduce the size of photo in iPhoto?  The size of my imported photos from my camera are 2 - 3 MB and for my purpose I need 200 - 400 KB.   Scanned copies of older photographs with a size of 100 to 500 KB work very well.  Any help is greatly appreciated. 

    File -> Export and make your choices in the Export dialogue.
    Jpeg Quality and Size will have most effect on file size. Note that 'Size' refers to the pixel dimensions of the photo.
    This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • HT1529 How to find another Apple ID is registered my Product the Serial number.

    How to find another Apple ID is registered my Product the Serial number.
    my Apple Product cannot register to my Apple ID.

    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/

  • If I'm copying text and/or vector elements from Indesign to Photoshop how come their pixel sizes change even though I opened the same sized document and my indesign file is a web file?

    If I'm copying text and/or vector elements from Indesign to Photoshop how come their pixel sizes change even though I opened the same sized document and my indesign file is a web file?

    >my indesign file is a web file
    Pardon?
    Or do you mean that, when you created a new document, you choose Web as intent maybe?

  • Help with reducing the size of an image but keeping the quality

    Hello,
    I am wondering how do I resize an image but keep the quality. I am creating a folder design for work and I want to include 6 images on the back each of 156px x 118px.
    The images I have are slightly different in size but for example sake one of the images that I have is 225px x 158px. The quality is very poor when I reduce the size.
    I have tried changing the ppi to 72 and to 300, I have also tried resizing all in one go and in a number of goes and I have tried the bicubic sharpener but I have just had no luck with it.
    I am wondering if anyone can help with this,
    Thanks
    Tracy

    Hi Tracy,
    A couple of questions:
    I am creating a folder design for work...
    So this is printed? How large? Pixels are not a unit-of-measure for print.
    If for print, you are looking at ppi of 300 or higher AT PRINT SIZE.
    So, say you want a 3in x 4in picture. That would mean your original would have to be at least 900px X 1200px. (ie 300ppi x width, 300 ppi x height)
    If your original files are not at least that resolution.. . it is hard to add quality after the fact. Unless your are working with vector art.
    I have tried changing the ppi to 72 and to 300, I have also tried resizing all in one go
    Be sure to do that on copies of original. Keep in mind the PPI number by itself is completely meaningless. It only has use in describing a to be printed image when combined with the print size.

  • I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections

    I have few PDf files on my computer and I want to add them to my ipod touch, please tell me the procedure on how should I do that? Secondly I want to run these Pdf files through the ibook app, as it also have the Pdf file sections

    You should be able to just place them in your Books library in iTunes and check to ensure that your Book library is configured to sync to your iPod when you sync your iPod to iTunes.

  • Changing the size of a drop down list

    Hi Everyone,
    Is there anyway to change the size of a drop down list?  For example, our customer would like to make the drop down list for the Ship-To field on the logistics tab of the sales orders longer.  Currently, they cannot see the full name when they scroll through it.  Is this possible?  Depending on what Customer Code they enter, the field size appears to change.
    Thank you in advance for your help.
    Amanda

    I am using Tahoma size 10 as well. 
    Is the drop down size somehow related to the size of the first few records?  So, if those are shorter than those at the end, perhaps it doesn't adjust for the size of the bottom records.  For example, in our customer's database here's a sampling of what they have entered and the order:
    Wal-Mart 6124
    Wal-Mart 6125
    Wal-Mart 6126
    Wal-Mart 7001
    Wal-Mart Supercenter 1111
    Wal-Mart Supercenter 2094
    Wal-Mart Supercenter 3475
    The drop down box is large enough to see the Wal-Mart 6124, etc. but not large enough to see the Wal-Mart Supercenter ones at the bottom of the list (keep in mind there are over 100 ship-to's for this Business Parnter).  Does it maybe only look at the first fifty records or something like that?
    Thanks again,
    Amanda

  • I have purchased a in app purchase of a 'gcsepod' for my little brother however the purchase does not come up in the app and requests me to buy another. How do i solve this? I have also got the receipt for this purchase.

    i have purchased a in app purchase of a 'gcsepod' for my little brother however the purchase does not come up in the app and requests me to buy another. How do i solve this? I have also got the receipt for this purchase.

    I'm not sure I can make sense of this but without asking too many questions, you can resolve your question by contacting iTunes direct.
    Apple - Support - iTunes - Contact Us
    But they will be wondering about the reference to hacking and you feeling bad about getting something for free.
    Best step in my view is to make sure you don't get similarly involved in future.  You must know roughly what you were doing.   Then writie it off to a not to be repeated experience.

  • I logged in to my device in my laptop and I discovered that another device is also connected to my apple ID. When I find my I Phone, I can also view the other device location. Is my account being hacked or hijacked?

    I logged in to my device in my laptop and I discovered that another device is also connected to my apple ID. When I find MY I PHONE, I can also view the other device exact location. Is my account being hacked or hijacked? Please help...

    I guess you're talking about iCloud?  Yes if you can see two devices it would appear that someone else can get into your account.  Best change your password.

  • We have only GL SAP document number. how to find Vendor clearing document by these GL Document number please suggest and suggest Tcode.

    We have only GL SAP document number. how to find Vendor clearing document by these GL Document number please suggest and suggest Tcode.

    Hi Mahesh,
    To display a document, proceed as follows:
    Tcode : FBL1N (Vendor Line Item Display)
    1-Select option's.
    2- List
    Regard's.
    Cem Ates

  • The size of your selected options exceeds the available space

    I am trying to install a brand new full version of Adobe Creative Suite 4 Web Premium.
    I am unable to proceed, as the install options window tells me "The size of your selected options exceeds the available space" with a red exclamation point.
    It says my options require 9.6GB of space.
    I am trying to install on my D Drive, which has 1.1 TB of available space. Yes, that's right, Terrabytes.
    Help!
    System: Intel Core2 Quad Q6600 @2.4 GHz, Windows Vista Ultimate 64 bit SP1, 4 GB RAM, system drive WD Raptor (75GB) and main drive (where I am trying to install CS4) is (6) 500GB seagate SATA hard drives in a 2.5TB RAID 5 array. Motherboard is a Gigabyte GA-P35-DQ6 and video is an Nvidia GEForce 8800GT (512 RAM). RAID controller is onboard the motherboard (Intel ICH8R)

    SOLVED!
    Bob and Peter, you nailed it.
    I had inadequate room on the C drive...I was down to only 5 GB of space.
    I cleaned up the desktop (The wife thinks that is a great place to store everything) and freed up my C drive so it had just over 10 GB of free space, and the red exclamation point went away. It is now happily installing onto my D drive.
    Ian, my C drive (system) is a Western Digital Raptor...10,000 RPM. They are really small (75GB) but really fast so that windows boots up really quick. It is a performance thing. My D is a RAID array for redundancy...as I cannot afford to lose my pictures, videos, and documents, etc. - and I always keep my program installs on D so as to keep the C drive speedy and un-cluttered - plus if and when windows gets corrupted (which it does once every couple of years for some reason), I can re-do it in 5 minutes with an image using Acronis True Image.
    Thanks to all of you for your ideas, and I am glad I got it solved. If any Adobe employees read this...you can at least throw in some nice paper manuals for the software. When software is $1600.00 I'm not real concerned about saving another tree - and you shouldn't be either...I'd rather have some paper manuals for reference when I buy a full retail package. So pump up the packaging please. Thanks!!!!
    Shane

  • Having horrible service with 4GLTE I have had 3G for several weeks (I am not the only person I know having this problem), I have reset my network settings and it did not resolve the issue.  I am also unable to send SMS and text messages without them eithe

    Having horrible service with 4GLTE I have had 3G for several weeks (I am not the only person I know having this problem), I have reset my network settings and it did not resolve the issue.  I am also unable to send SMS and text messages without them either failing or not sending at all.  Is there an outage in the Cleveland, Ohio area (zip codes 44129, 44134, 44137) or anything else I can do to resolve this issue?

    Not that I'm a Verizon employee, but I have experience in the field. An LTE tower will only extend up to, on a perfect day, with no elevation, 6-7 miles. On a typical day, you will be lucky at four (4) miles. The three ZIP codes you've given are all within about a 12 mile radius. That would mean that 2-3 towers are currently down at the same time, and Verizon would know about it within the hour. Being it's Cleveland, I'm sure they would receive numerous calls regarding an outage of that size.
    My point is that if you're having issues in all three ZIP codes, chances are it's a phone issue. If you're handset is simply not receiving LTE, but still receiving 3G, that would signify a SIM card issue. You need to get your SIM card replaced.

  • Hi there - I have a Mac and use the 15.0 version of Adobe Illustrator. I can't locate the pattern tool under the 'Options' tab. I also checked the help section and it doesn't exist.

    Hi there - I have a Mac and use the 15.0 version of Adobe Illustrator. I can't locate the pattern tool under the 'Options' tab. I also checked the help section and it doesn't exist.

    Thanks Manish!
    I was following the instructions my teacher sent and there was no mention of what program the tutorial used. I ended up finding a pattern tutorial for CS5.
    Rosa

Maybe you are looking for

  • Can you 'lock out' a workstation via ZENworks?

    Hi, I was wondering if there was a way to 'lock out' a workstation via ZENworks so users can no longer log into the workstation temporarily. This is the scenario - when someone within our company orders a new workstation, they will many times tell us

  • Crystal report windows forms viewer - error in file

    I am using visual basic - visual studio 2005 with crystal reports version 11.5 and am getting the following error when deploying to a windows 7 32 bit machine Error in file c:\users\username\appdata\local\temp\tempmanynumbersandcharacters.rpt The req

  • HP Color Laserjet CM1312nfi MFP cannot scan

    Dear HP support, I use a MacBook and my printer is an HP Color Laserjet CM1312nfi MFP.  When doing the HP setup assitant I connect the printer to the MacBook with a USB cable but the assistant does not recognize the printer and I cannot carry on with

  • Regarging multiple controllers

    Requirement is to have multiple MRP controller in the selection.Regenerative planning necessary to convert planned orders outside of opening period to purchase requisitions. Job to run transaction MD15. if any one had any idea please let me know

  • Click on a link and open a small window

    I need to open a small window when user click on link. child window got a form, user need to fill in. Then click submit. Child window entry need to enter to db, and close the client window. What is the best way to do this?. Please post a sample code.