How can i find total no of files in a directory ..using fileconnection

how can i find total no of files in a directory.
currently iam using
Enumeration enum = fileconn.list(); and by iterating iam getting count.
but the application is getting stuckup when the number of files in the directory is large.
Is there any alternative. please help.
thanks in advance.

HI,
this is a simple example with a cursor over user_tables view:
set serveroutput on
DECLARE
   CURSOR c_test IS
      SELECT table_name FROM user_tables;
   type t_reg is table of varchar2(30);
   l_reg t_reg;
BEGIN
   OPEN c_test;
   fetch c_test bulk collect into l_reg;
   dbms_output.put_line(c_test%ROWCOUNT);
END;
/Output:
SQL>
SQL> set serveroutput on
SQL> DECLARE
  2     CURSOR c_test IS
  3        SELECT table_name FROM user_tables;
  4     type t_reg is table of varchar2(30);
  5     l_reg t_reg;
  6  BEGIN
  7     OPEN c_test;
  8 
  9     fetch c_test bulk collect into l_reg;
10 
11     dbms_output.put_line(c_test%ROWCOUNT);
12  END;
13  /
42
PL/SQL procedure successfully completed
SQL> Regards,
Edited by: Walter Fernández on Nov 29, 2008 8:59 AM - Adding output...

Similar Messages

  • How can I find .plist and .kext files?

    How can I find .plist and .kext files which are corrupt and need to be deleted before restarting and reloading applications)? Where are they hidden? How do I make them visible?
    /hezet

    Thank you Eric and Lanny for your answers!
    I was confused as the files could neither be found by Spotlight nor by the search field in the upper right corner of the Finder windows (why??), but I have located them now. The files were:
    AppleUSBEthernetHost.kext  The name appeared in i a warning window now and then.
    The .plist files were reported red (failed) by EtreCheck:
    com.apple.CSConfigDotMacCert-***@me.com-SharedServices.Agent.plist
    com.adobe.SwitchBoard.
    com.apple.netauth.sysagent.plist
    I have deleted all four files and restarted the computer. Now there are no items in red in EtreCheck, but none of the deleted files has been replaced after restart.
    So far the computer seems to work well. What action do you consider appropriate now?
    /hezet

  • HT204053 My ipad stores my documents on iCloud. How can I find them from a different computer, as I used to do by using a memory stick on my old PC etc ?

    My ipad stores my documents in iCloud. How can I find them from a different computer?  I used to use a memory stick and could work on my documents on any computer and want to have a replacement system using documents created on my ipad - I can't use a memory stick with it.

    How do you know that they are on iCloud, the iPad can (and does) save locally. If they are on iCloud they will be accessible via the application that created them (Pages, Numbers etc) and can be reached from any computer with iCloud access by logging to iCloud.com. But you did that and stated that they are not there, so what makes you think that they are?

  • I've lost my iPhone 4... How can I find it when the device is offline when using "find my iPhone app"????? Any way of getting a location from it????

    I've lost my iPhone 4... How can I find it when the device is off linesmen using "find my iPhone app"????? Any way of getting a location from it?????

    No. It must be online in order to locate it.
    What To Do If Your iDevice Is Lost Or Stolen
    iPhone, iPod Touch, and iPad
    If you activated Find My Phone before it was lost or stolen, you can track it only if it is connected to the Internet by Wi-Fi or cellular. What you cannot do is track your device using a serial number or other identifying number. You cannot expect Apple or anyone else to find your device for you. You cannot recover your loss unless you insure your device for such loss. It is not covered by your warranty.
    If your iPhone, iPod, iPod Touch, or iPad is lost or stolen what do you do? There are things you should have done in advance - before you lost it or it was stolen - and some things to do after the fact. Here are some suggestions:
    This link, Re: Help! I misplaced / lost my iPhone 5 today morning in delta Chelsea hotel downtown an I am not able to track it. Please help!, has some good advice regarding your options when your iDevice is lost or stolen.
      1. Reporting a lost or stolen Apple product
      2. Find my lost iPod Touch
      3. AT&T. Sprint, and Verizon can block stolen phones/tablets
      4. What-To-Do-When-Iphone-Is-Stolen
      5. iCloud- Use Lost Mode
      6. What to do if your iOS device is lost or stolen
      7. 6 Ways to Track and Recover Your Lost/Stolen iPhone
      8. Find My iPhone
      9. Report Stolen iPad | Stolen Lost Found Online
    It pays to be proactive by following the advice on using Find My Phone before you lose your device:
      1. Find My iPhone
      2. Setup your iDevice on iCloud
      3. OS X Lion/Mountain Lion- About Find My Mac
      4. How To Set Up Free Find Your iPhone (Even on Unsupported Devices)

  • How can u insert and retrieve text files in any format using forms6i.

    how can u insert and retrieve text files in any format using forms6i.
    can u give me an example of an insert statement, let's assume the file is located in the a:drive.
    and retrieving the files, i would give the user a list of all the files that are in the database, the user would select one, but what command(or piece of code) would open the file in its apppropriate editor.
    e.g .pdf formatted file would open in acrobat.
    any help would be appreciated.
    Thanks
    Hussein Saiger

    the filereference class is for downloading and uploading files.
    if you want to load xml, use the xml class.
    and, if you want to write to an xml file and don't want to use server-side code, wait.

  • How can I find out what kind of battery my computer uses in order to buy a replacement?

    I purchased a new Macbook Pro 13" in January 2012. Unfortunately, I did not purchase Apple Care. My trackpad seems to have taken on a life of it's own. I'm guessing this is due to a swollen battery. How can I find out what kind of battery my computer uses in order to buy a replacement?

    Take a look at this link, http://store.apple.com/us/search/macbook-pro-battery-replacement?mco=Nzc1MjMwNg
    This is the MacBook Pro repair answers, http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=Macn otebooks

  • How can I find and delete duplicate files in Mt Lion?

    As a competent, but self-trained mac user for 30 years, I'm totally baffled by the sudden appearance of multiple duplicate documents and .jpgs in my imac files. How can I find and delete them?

    Duplicate Annihalitor - http://brattoo.com/propaganda/ - or Decloner - http://www.pixelespressoapps.com/decloner/
    LN

  • How can I find who deleted my files?

    Hello all.
    In my local network, A user see my share partitions and files then removed them, How can I find who did it?
    THanks.

    This question is duplicated (and answered) in:
    how can track who deleted file/folder from Windows Server 2008
    regards

  • My hard drive is full, i'm being told i have 284.03 GB of other.  How can I find out what these files are so i can delete them?

    My Mac is telling me that my hard drive is almost full, i have used 7.65 GB for Audio. 16.58 GB for Movies, 9.89 GB for photos, 788.6 MB for Apps and 284.03 GB for Other.  how can i find out what "other" is so I can delete it?  I hope someone can help me.

    If OS X is reporting you need to remove some items you obviously have a more severe issue.
    To fix your issue is likely too complicated and lengthy to go into all of it here as it sounds like a OS X issue, it will require the services of person very familiar and experienced with Mac's to first recover your data and then restore OS X back to a functional state which may or may not require new hardware/software installed.
    If your under warranty or AppleCare, take it in for service.
    You can also hire the services of a local Mac computer support technician experienced in these matters.
    Have them look at your Wifi, RAM amount, extra storage and computer backup proceedures in the process.
    Good Luck.

  • How can I find out what port number my DB is using

    How would one find out what port number a database is using? Is there a SQL command that will allow us to do this?
    Thanks,
    oracle_newbie

    newbie
    Oracle databse assigns a dynamic port number for each established session. Usually, the common port is 1521 which is defined in you tnsnames.ora, however, this is used for requesting a dynamic port. Dynamic ports are within a ragne of 1000+. That's why it is hard to tell which port you are using at a certain time. You should have a network monitoring tool to check this accurately.
    Regards
    null

  • How can I find Bitlocker External Key File location?

    My Windows 8.1 PC includes a system drive and data drives. All the drivers were encrypted using Bitlocker with the data drives set for autounlock. 
    I recently decrypted the system drive (without decrypting the data drives) and reinstalled the OS, after which my data drives required the Bitlocker recovery key to unlock. 
    However, I had "backed up" the recovery keys to my Microsoft account but now I can find only the recovery keys for the system drive. The recovery keys for the data drives cannot be found on my Microsoft account. 
    I have tried to use the "manage-bde" command at the console to obtain the recovery password but I am only getting the Numerical Password ID and the External Key File Name. Can anyone provide advice on how I can retrieve the passwords or the
    External Key File location?
    Thanks.

    Hi Ridgewood,
    As my point of viewer, the BitLocker Automatic unlock volume is also protected by BitLocker Disk Encryption. The user encrypted information is stored in the registry and volume metadata. After a user unlocks the operating system volume, BitLocker uses the
    encrypted information to unlock the data volume automatically.
    After the reinstallation of the system, the encrypted information is lost and BitLocker can’t unlock the data volume automatically.
    Every volume has own recovery key.
    As mentioned in your post, the data drive require the recovery key to unlock.
    I suggest you to double-check the OneDrive and try to find out where did you store the recovery key.
    If you can’t find the recovery key, we can’t help you to decrypt the data volume.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • How can I find out which iTunes library my computer is using?

    I have a desktop Mac Mini at home that my wife uses and a MacBook Pro that I use at home and in the office.  I wanted to be able to access all the music we have on both machines from both machines, even when I am out and about and have no network connection for my MacBook Pro. So, I uploaded all the music we had on iTunes to Dropbox, and this now syncs on both computers.  So, whenever either of us adds music to iTunes, the songs are saved on both machines within the Music folder in Dropbox, which syncs in real time across both computers.  So far so good.
    However, what I am finding is that, when either of us adds new music to our respective iTunes, it only shows on the computer on which it's been added.  So, within a matter of weeks, our computers no longer show the same music in our respective iTunes windows, even though the music is present on both machines in the synchronised Dropbox folder.
    I realised that the computers must start using different iTunes library to each other when new songs are added to either machine.  So, I figured that, when we add music to one of the computers, if I pointed iTunes on the computer that has the less up-to-date music to the latest library that is being used by the computer with the more up-to-date music, this would ensure that both machines showed the same music in their repective iTunes windows.  The problem is that I cannot work out which iTunes library is being used by the computer with the more up-to-date music on it.  I know how to choose a different library when I open iTunes (hold down alt) but that doesn't help, because I all I want to do is to FIND OUT WHICH LIBRARY IS BEING USED BY ITUNES ON THE COMPUTER WITH THE MORE UP-TO-DATE MUSIC.  I simply can't find a way of getting iTunes to show me which library it is using, although this must be the simplest thing in the world. An additional issue is that I want to playlists we have created to appear on both machines - will that be the case if I point the less up-to-date iTunes (on my wife's Mac Mini) to the library of the more up-to-date iTunes (on my MacBook Pro), since my computer with the more up-to-date iTunes shows all the playlists, whereas my wife's doesn't?
    So, can anyone help?  Plus if anyone knows of any software that can automatically ensure that two different Macs both use the same and most up-to-date iTunes library and therefore always show the lastest music collection, whichever machine the music has been added to, that would be fantastic.  Thanks.

    You could have all the computers point to the same library but it can't be opened by more than one at any time.
    No answer for knowing which library is in use other than selecting it at startup.  This question gets asked here occasionally but I don't think it is a high-demand feature since most people have just one library.  I guess you could put in an empty playlist with the library name so you have an identifier.

  • How can I write more than 32k file in oracle directory

    Hi experts,
    I am struggling while I write more than 32k file size in oracle directory, and throws an error ‘ORA-06502: PL/SQL: numeric or value error, like this.
    This is my procedure
    declare
    l_s_filename   UTL_FILE.file_type;
    begin
       l_s_filename := UTL_FILE.fopen ('INFO_MIGRATION', 'finfinne.txt', 'W');
    FOR rec
          IN ( SELECT SQL_REDO
                  FROM V$LOGMNR_CONTENTS
                 WHERE seg_owner <> 'SYS' AND username = 'GENTEST'
                 AND TABLE_NAME NOT LIKE '%_TEMP'
                       AND OPERATION IN ('UPDATE','INSERT','DELETE')
              ORDER BY TIMESTAMP)
       LOOP
          UTL_FILE.put_line (l_s_filename, rec.SQL_REDO);
       END LOOP;
       UTL_FILE.fclose (l_s_filename);
    end;can any please help me how can I overcome this problem
    Thanks,
    Arun

    You can write by breaking it into small chunks. Also you can try to use DBMS_XSLPROCESSOR.CLOB2FILE. For UTL_FILE the code snippets may looks like
    -- Read chunks of the CLOB and write them to the file
    -- until complete.
       WHILE l_pos < l_blob_len
       LOOP
          DBMS_LOB.READ (rec.l_clob, l_amount, l_pos, l_buffer);
          UTL_FILE.put_line (l_file, l_buffer, FALSE);
          l_pos := l_pos + l_amount;
       END LOOP;

  • How can I find the iphone backup files

    I recently moved my iTunes files to an external hard drive and wiped my PC.  In the meantime I had to replace my iPhone.  Now I don't know how to restore all the apps, pics, etc to my new iPhone!  Help!

    The location of the backup file is :
    Mac: ~/Library/Application Support/MobileSync/Backup/
    Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    Windows Vista and Windows 7: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
    So it isn't in the iTunes directory, so you may not have copied it - if you did then copy it back to the same location on your computer.
    If you copied the iTunes directory then you should have copies of your apps (though not their content) in a folder called Mobile Applications, if not then you can re-download them for free : http://support.apple.com/kb/HT2519

  • How can i find total no of records in a cursor

    Hi
    Its very helpful if anybody reply my doubt
    I have a cursor declared in a procedure.
    i opened that cursor, i want to know the count of records in the opened cursor, means total count of records.
    is it possible??
    Pls reply ASAP

    HI,
    this is a simple example with a cursor over user_tables view:
    set serveroutput on
    DECLARE
       CURSOR c_test IS
          SELECT table_name FROM user_tables;
       type t_reg is table of varchar2(30);
       l_reg t_reg;
    BEGIN
       OPEN c_test;
       fetch c_test bulk collect into l_reg;
       dbms_output.put_line(c_test%ROWCOUNT);
    END;
    /Output:
    SQL>
    SQL> set serveroutput on
    SQL> DECLARE
      2     CURSOR c_test IS
      3        SELECT table_name FROM user_tables;
      4     type t_reg is table of varchar2(30);
      5     l_reg t_reg;
      6  BEGIN
      7     OPEN c_test;
      8 
      9     fetch c_test bulk collect into l_reg;
    10 
    11     dbms_output.put_line(c_test%ROWCOUNT);
    12  END;
    13  /
    42
    PL/SQL procedure successfully completed
    SQL> Regards,
    Edited by: Walter Fernández on Nov 29, 2008 8:59 AM - Adding output...

Maybe you are looking for