How to know total size of a folder? plz help

hi,
I want to know total size of a folder in which other folders & files r there. I know how to find the size of a particular file but not directory. Plz send me code.

hi,
I want to know total size of a folder in which other
folders & files r there. I know how to find the size
of a particular file but not directory. Plz send me
code.you could write the code yourself. you could use a
recursive method that builds a collection of files and
then loop through each file and add it's size to a total.
send a directory to this method, get a File[ ], then check
file.isDirectory()
if not, get the size, if so do file.listFiles() and go again.

Similar Messages

  • How to check total size of attachment stored in database?

    Hello guys,
    Firstly I'm new to this forum & SAP Basis. Therefore i want to apologize if i'm posting in wrong area.
    Actually I want to know how to check total size of attachment that have been uploaded in ECC.
    From the current database size, how can i check how much space have been used to store attachment such as pdf, doc, xls and tif. I  want to know how much space have been utilized by those attachments from August 2010 until now.
    FYI, those are PR, PO & MIGO attachments.
    Where do i start? What are the tables to check? Which table keeps record of the attachment size? etc.. etc..
    Really appreciate if you guys can give me some guideline.
    Thank you & Rgds,
    fafizah.

    Hi,
    As such there is no direct way to do this but if you will able to find out which all table stores the attachment then you can find out the size of those table from database level.
    Thanks
    Sunny

  • How to know the size of a DATABASE ?

    Guys,
    How to know the size of a DB ?
    Also
    How to know the size of a TABLE ?
    How to get the content of a procedure/view/trigger ?
    Inputs are welcome !

    How to know the size of a DB ?If you want to know the physical size, query dba_data_files + dba_temp_files. if you need to know the actual consumed space in those files, compute sum of bytes from DBA_SEGMENTS.
    How to know the size of a TABLE ?Query all/dba/user_segments.
    How to get the content of a procedure/view/trigger ?all/dba/user_source, all/dba/user_views, all/dba/user_triggers.
    Message was edited by:
    Satish Kandi

  • 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

  • How to know the size of a webservice request

    Hello...
    I'd like to know if you know how do I get the size of a Web request? I mean, I need to know the size of a Web Request 'cause I'll fill a Gauge Object up based on the quantity that I have received from the WebService.
    I'm using the KSOAP and KXML API's for consuming that WebServices and I used the Content-lengh Method and it didnt return anything to me... it returned empty. So, do you know how do I fill a Gauge Object based on the size of the WebRequest? Could you tell me some examples plz?
    Thanx...
    Lucas Abrao

    How to know the size of a DB ?If you want to know the physical size, query dba_data_files + dba_temp_files. if you need to know the actual consumed space in those files, compute sum of bytes from DBA_SEGMENTS.
    How to know the size of a TABLE ?Query all/dba/user_segments.
    How to get the content of a procedure/view/trigger ?all/dba/user_source, all/dba/user_views, all/dba/user_triggers.
    Message was edited by:
    Satish Kandi

  • HT1338 I connected a HDMI cord to my macbook from my TV and I mirrored it so I can see my macbook on my TV but the sound wont transfer to my TV, How can I do make this happen? PLZ help, Thank you

    I connected a HDMI cord to my macbook from my TV and I mirrored it so I can see my macbook on my TV but the sound wont transfer to my TV, How can I do make this happen? PLZ help, Thank you

    What model and year is your MacBook?  Some older MacBooks don't support Audio out via miniport/HDMI (the display miniport is video only).

  • I m a new user plz give me icloud account bt previous owner she dead and i dont know about this information this phone. plz Help me icloud account as early as possible

    i m a new user plz give me icloud account bt previous owner she dead and i dont know about this information this phone. plz Help me icloud account as early as possible

    Apple is not here and will NOT give you the information. Contact the relatives of the "dead" owner.

  • How to Know total users in Portal

    Hi,
    How to know the total users in Portal.I gone to User Administraion and tried to search in that with out any parameter then I got a message like "Last search Exceeded the size limit of the Server.Search result is incomplete." and "Last search returned with 1000 elements.". But I want to know the TOTAL USERS in the PORTAL.
    Can u help me in this regard. Urgent.
    Regards
    Krishna

    Hi Krishna,
    the paged search is possible by using the
    parameter "ume.ldap.access.extended_search_size" in your configuration XML.
    Just set a value blow 1000 e.g. 900 as like in this
    example and all entries above 900 will be paged:
    <ume.ldap.access.extended_search_size>900</ume.ldap.access.extended_search_size>
    Do not forget to restart and check the values "Max. Search" and "Warn. Search" set for  the Admin-UI.
    Regards
    Stefan

  • How to find total size of selected items in library

    My library contains much more than my 2GB Nano can hold. I frequently change the content of the Nano with songs and books. How can I keep track of the total size of items I'm selecting for the next Nano update to speed my update? Presently I can only guess what to unselect if the selections are of greater size than my Nano will hold.

    There is no direct way to accumulate total file size when selecting a subset of songs within the Library or a Playlist.
    The only way you can manage this is to create an empty Playlist that you can drag songs into. It will accumulate the total size of the songs as you deposit them into it (as described by StarDeb above).
    If you get to a size greater than the nano will hold, then remove one or more songs from that Playlist.
    There is no 'running-total' of only the selected items like Windows Explorer does. Sorry.

  • How to know exact size of table with blob column

    I have a table with one BLOB column. I ran this query.
    select bytes/1024/1024 from user_segments where segment_name='GMSSP_REQUEST_TEMP_FILES'
    (user_segments is a view)
    it gave me 0.125
    It means size of table is 0.125. I have uploaded 3 files to this table. Each of them is of 5 mb. After that I check size of table. but result was same. i.e 0.125.
    Can any body tell me how to know exact amount of space consumed by files. I am expecting following result
    size should be (5+5+5+0.125)MB
    Any help is appreciated.
    Thanks.
    Akie

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1092.htm#i1581211
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:266215435203#993030200346552097

  • How to know the size of bad sector block after zero out erase?

    I found some problems on my USB external harddisk recently. After I backup all the files, I erased the whole volume by choosing "zero out data" option. According to some web articles, "zero out" detects and marks those bad sectors to avoid further read/write action on the damaged area.
    My question is that how can I know the size of disk space marked as bad sector? Because I can only see how many space is used or available when I check a disk in disk utility. There are about 600MB used for my 1TB hard drive. I guess there is some storage used by spotlight or other hidden files. But I have no idea for how many MB is occupied by bad sector...

    Yes you can look at see the original number of spares, the number used, and the number remaining spares.
    Disk Warrior for one, writes the SMART data to system.log Other programs can also read and report (not sure which if any write to system.log though) those field values from SMART table entries.
    IF the number of spares is declining, time to replace. Trouble is OS X hasn't had a good record of reporting I/O errors, let alone remapping. Some 3rd party utilities will. I've found the vendor (WD, Hitachi etc) have the best utility for their own drives, but those are Windows programs or LinuxCD. Also the best way to zero and map out bad sectors, too.

  • How to know the size in byte of a file before importing it with ftp

    hello
    i have a file in witch there is the pathe of many file
    i reade these path and i use ftp to get these file
    my problem is that i want to display a progress bar during the getting of file
    so dont no how i can know the size of these file to put a maximum to the progress bar

    package cni;
    import javax.swing.*;
    import sun.net.ftp.*;
    import sun.net.ftp.FtpClient.*;
    import java.io.*;
    import java.lang.*;
    import sun.net.TelnetInputStream;
    import java.util.*;
    import java.lang.String;
    public class FTPclients
    //Variables
    private static String server = "faycal";
    private static int port = 21;
    private static String user = "anonymous";
    private static String passwd = "[email protected]";
    public String toString(JTextField tx)
    String txt;
    txt= new String(tx.getText());
    return txt;
    public static void main(String args[])
    ConnFile cf = new ConnFile("d:\\cni\\adresse.txt");
    FTPclients fc = new FTPclients();
    ConnFile cfbis = new ConnFile("d:\\cni\\chemin.txt");
    try
    //String s=cf.lectureid();
    String s;
    while((s=cf.br.readLine())!=null)
    String s1=s.substring(0,s.lastIndexOf("\\"));
    String s2=s.substring(s.lastIndexOf("\\")+1);
    System.out.println(s1);
    System.out.println(s2);
    //ajout du double anti slash a la chaine s1
    String name =s1;
    StringBuffer sb = new StringBuffer(s1.length()+10);
    for(int index=0; index<s1.length();index++)
    char c = s1.charAt(index);
    sb.append(c);
    if(c=='\\')
    sb.append('\\');
    System.out.println(s1);
    s1= sb.toString();
    System.out.println(s1);
    //creation d un client ftp
    FtpClient client = new FtpClient();
    System.out.println("gggggggggggggalut");
    client.openServer(server,port);
    System.out.println("xxxxxxxxxxxxalut");
    client.login(user, passwd);
    client.binary();
    client.cd(s1);
    System.out.println("la taille de "+s1+" est "+taille+" octets");
    System.out.println("ssssssssssssalut");
    System.out.println(client.welcomeMsg);
    System.out.println("buhhhhhhhhhhhhh");
    //copie du chemin saisi par l utilisateur
    String chemre;
    cfbis = new ConnFile("d:\\cni\\chemin.txt");
    String chemvir = cfbis.lectureid();
    System.out.println(chemvir);
    if (chemvir==null)
    chemre="d:\\";
    System.out.println(chemre);
    else
    chemre=chemvir;
    System.out.println(chemre);
    String chem=chemre+"\\"+s2;
    System.out.println(chem);
    //pour creer le nouveau fichier
    TelnetInputStream fich = client.get(s2);
    FileOutputStream out = new FileOutputStream(chem);
    //pour ecrire dans le nouveau fichier
    int i;
    while(true)
    i = fich.read();
    if(i == -1)
    { break; }
    out.write((byte)i);
    System.out.println("bahhhhhhhhhhhh");
    //fermeture du serveur ftp
    client.closeServer();
    System.out.println("ok");
    }//fin while
    String chemvir = cfbis.lectureid();
    }//fin du try
    catch(IOException e)
    System.out.println(e);
    }//fin du main
    }// fin de la classe
    do you know how

  • How to know the size of a client and an instance ?

    hi,
    How to know and measure the size of a client and an instance ?
    comment and advice will be appreciated.
    regards,
    kent

    Hi Kent,
    I always measure the size of the complete DB (instance) with DSPLIB *PRINT in batch - the very last line is the size. You could have a look into DB02 as well.
    The client size is more complicated ...
    You could do a "test-client-copy" - there it reports a size - but this size is far too small normally ....
    Regards
    Volker Gueldenpfennig, consolut international ag
    http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

  • How to know the size of the EEPROM after loading any Applet

    How can I know the size of the EEPROM after loading any applet..
    Any comments on this is appreciated
    Thank you in advance

    kishansaralaya wrote:
    Thanks for your suggestion.
    But when I try to use
    short memRemaining = JCSystem.getAvailableMemory(JCSystem.MEMORY_TYPE_PERSISTENT);
    it always shows 32767. Even after loading some applet.
    And I am using 72K Java card then how it can show only 32Kbyte as the remaining memory value.This is because a short isn't big enough to display a number above 32767. One way around this is to use a byte[] to fill up some of the space with your temporary applet.
    byte[] memoryFiller = new byte[32767];
    short memRemaining = JCSystem.getAvailableMemory(JCSystem.MEMORY_TYPE_PERSISTENT);The value of memRemaining + 32767 is the amount of persistent memory left on the card. If memRemaining is still 32767, you can add another byte[] starting with small values and increase the size until you get a meaning ful result (less than 32K).

  • How to know the size of data in some columns of a table?

    Hi,
    How can the size of of data for some specified column be determined?
    For example : TableA has 20 columns and the size of table is 20 GB. I want to know the size of data kept in last four columns.
    Thanks in Advance,
    Vishu

    You could use vsize to determine the size of a column element and sum them upselect sum(vsize(column_of_interest)) from whatever_table;

Maybe you are looking for

  • Is it possible to upgrade from Tiger (10.4) to Leopard (10.5)? Thanks

    Wondering if I can upgrade from TIger to Leopard (and then to Lion) on my old Macbook. Don't really want to buy a new notebook when this one works fine. But would like to use some of the features available through Lion (notably iCloud). Thanks.

  • I upgraded to Mac OSX Mavericks and my adobe cs4 licensing won't work

    I bought my mac book pro a couple of years ago for my education at Kendall College of Art and Design.  As a student I had my computer come installed with the student edition of Adobe Creative Suite 4.  A few weeks ago, I went in to the Apple store to

  • AirPort Express and Canon MX310

    Hello I am trying to setup my Canon MX310 via AirPort Express: Today i bought the AirPort Express and everything works fine. But printing does not work at all: I usually connected my printer directly via USB to my iMac. When i did that the first time

  • Trouble With a Gray Screen

    Today I ran into a bit of a problem that soon eliminated almost all troubleshooting possibilities. This morning I was playing on World of Warcraft when the computer pinged me to plug in the power. I did so, and the light turned on indicating that it

  • DOCUMENTED  GOODS MOVEMENT  FOR COLLECTIVE ORDER

    Hi Guru's In  the  4.6C version  If i got to Production order from transaction code CO03 , Read the collective order , highlight the toplevel item and ''GOTO'' in the menu bar and select Documented goods movement , the display shows the Top level ord