How do i delete perticular type file(*.enc) from folder/File recursively ?

i know File class and File[ ] of java
but can u give me code to delete (*.enc) file from folder inside folder. i mean recursively.
i used :
if(encFile.isDirectory())
File []fileList = (new File(encF)).listFiles();
//File[] fileList2= (new File(encF)).listFiles();
System.out.println("Your Directory is ="+encF);
for(int i=0; i < fileList.length; i++)
//put code here
if( (fileList.toString().endsWith(".enc")))
fileList[i].delete();
System.out.println("encFile:"+fileList[i]+" deleted.");
if(fileList[i].isDirectory())
if( (fileList[i].toString().endsWith(".enc")))
{         fileList[i].delete();
System.out.println("encFile:"+ fileList[i]+ "deleted");
System.gc();
}//for
}//check dir if

http://forum.java.sun.com/thread.jspa?forumID=31&threadID=563148
Next time, search for yourself.

Similar Messages

  • To delete perticular file (*.enc) from folder inside folder  n  so On...

    i want to delete file (*.enc) from following structure.
    d:/ test / myfile.enc
    d:/ test / ex / myfile.enc
    d:/ test / ex / eng /myfile.enc
    d:/ test / ex / Anymyfile.enc
    how to delete it from such type of structure only (*.enc) file OK
    reply me
    not who earlier reply me ( he must be shame to answer)

    > not who earlier reply me ( he must be shame to answer)
    What kind of remark is this?
    The one who replied to you, posted a link to a thread similar to your question, there is even some code in that thread how to recursively do what you want to do. In the other thread he told you not to cross-post your question.

  • How do I delete images in Finder's "all my Files" when I have the same pictures in a file in Documents? It seems like a lot of duplication. If I delete the individual image it disappears in the folder. Thank You.

    How do I delete images in Finder's "all my files" without deleting the images in a separate folder I have in Documents? It seems to be so much duplication. Just set up our new Mac and am not understanding how the files work. Thank you.

    All My files is a "search folder"
    it isn't real storage location. All files within your home folder are found by the criteria set for the search folder and displayed to you In one place.
    If the folder doesn't meet your needs, remove it from the sidebar.

  • How can I delete only one part of my xml file?

    Hello,
    I stored more than 100 users in only one xmltype column. For instance
    Create table agro(users XMLTYPE);
    ... and I inserted all users inside
    INSERT INTO agro values(XMLTYPE
    ('<?xml version="1.0" encoding="ISO-8859-1"?>
    <authentication><users><user>
    <name>cocoon</name>
    <password>cocoon</password>
    <role>admin</role>
    <title>Mr.</title>
    <firstname>Walter</firstname>
    <lastname>Cocoon</lastname>
    <company />
    <street />
    <zipcode />
    <city />
    <country>DE</country>
    <phone />
    <fax />
    <email />
    <bankid />
    <bankname />
    <accountid />
    </user>
    ... another user, etc.
    </users></authentication>'));
    Now I tried to delete only one part of this file. For example all persons with the name"cocoon".
    I used for this target the following statement:
    DELETE FROM agro agro
    WHERE agro.users.extract('authentication/users/user/text()').getStringVal()= 'cocoon';
    When I execute this statement, Oracle DB delete all users and not only with the name "Cocoon".
    How can I delete only one part of my xml file?
    Kind Regards
    M R

    This the expected behavoir. You uploaded a document containing multiple users and then asked XML DB to delete any documnet that contained a user with the name in question. The problem here is that you are creating a mega document that contains an aggregation of user documents but then trying to work with individual user documents. This is a bad idea.
    In general XML does not understand the concept of a collection of documents. It can only operate on one document at a time. Hence the tendancy to aggregate individual documents into a single larger document. Once you have an XML database, you can perform operations on collections of document, as easily as you can perform operations on individual documents, so the need to aggregate the individual documents together disappears.
    If you store each user document as a seperate document then your delete will work as expected.

  • How do I delete a movie (not bought from iTunes) and have it actually deleted from the library as well?

    How do I delete a movie (not bought from iTunes) and have it actually deleted from the library as well, I keep deleting stuff from iTunes to try and free up some space only to find the file still in the library?

    It depends upon what preferences settings you use.  Most people use default settings so when you delete an item it asks you if you want to get rid of the file too.
    If iTunes absolutely refuses to get rid of the file (I have never heard of this by the way) you can always go to the media folder or wherever the file is located and drag it to the trash yourself.

  • HT201303 How do i delete my credit card info from i tunes and still down load stuff??

    How do i delete my credit card info from i tunes and still down load stuff??

    I think this issue has already been resolved in other discussions, please review Apple Discussions more carefully before you start a new discussion. This makes it easier for people to find the "resolved" discussions when searching for the anwers, like you are.
    But I'll still give you some info.
    I would suggest that you sign into your iTunes Store account using a computer as mobile devices can sometimes not update the info on your iTunes Store account(all based on connection and some security features on your account). Once you sign in, click the arrow next to your email address in the upper right corner of the screen and then click "Account". In the Apple ID summary, you can click edit in the payment section and then you need to click "None" that appears. Try these steps:
    click this link:
    https://phobos.apple.com/accountSummary
    (If you are not already signed in, you will need to enter your iTunes Store account name and password and then click the Account Info button to sign in.)
    The Apple Account Information page will appear. On this page, click the Edit Payment Information button, which is the second button from the top.
    On the Edit Payment Information page, select "None" from the list of credit card types. This will delete your billing information.
    Be sure to click the Done button at the bottom of the page to save your changes.
    Please note: you cant remove your credit card if have an outstanding balance without providing a new credit card or iTunes Store Gift Card(needs to process all payments before you can remove a credit card). Also, any active allowances or subscrtiptions(i think) will not allow the credit card to be removed.
    Some people are not given the option to remove their credit card. This indicates a billing issue with your account. Email iTunes Store Support for assitance, but I would make sure you havn't used the iTunes Store account for a while(week) and then try again.
    All Apple ID info is private, so only the accoutn owner can edit the information. I suggest that you keep trying and trying after restarting your computer and many sign in and sign outs before you give up.
    _W_W_W_._I_N_F_O_W_A_R_S_._C_O_M_

  • How can I delete a "stuck" outgoing email from my iphone4s?

    How can I delete a "stuck" outgoing email from my aol mail on my iphone4s?  I believe it's "stuck" and not sending because the attached files were too large.  Nothing I've tried to send after that is going out, just waiting in queu.  Thank you!

    I think it's finally timed out.....

  • How do I delete Adobe Photoshop CS6 Trial from my MacMini?

    How do I delete Adobe Photoshop CS6 Trial from my Mac Mini? I was upgrading to Adobe Photoshop CS6 not extended. So now I have Adobe Photoshop CS5, CS6, and CS6 extended. My computer is running very slowly. Are all these programs large? Can I delete all but the CS6 and how do I keep the photos I've done in CS5 in CS6 if I want to delete the CS5?

    Your photos won't be affected by uninstalling anything.  Neither Photoshop nor Bridge keep, import or store any image files.  They are all wherever you installed them. (Unlike the crappy Apple iPhoto application, which hides your images from you inside the application package .)
    Two very important caveats:
    1.— Never drag any Adobe applications or their folders into the trash!  Always use the Adobe Uninstaller installed by default with each application.
    2.— The time to uninstall an older application is BEFORE installing newer versions of the application.  The reason for that is that the Adobe Uninstaller can and in all likelihood will damage later version installs.
    If you want to reclaim HD space, your best bet now is to uninstall all versions, including the most current one, then run the CSCleaner Tool, which you can search from and download for free from the Adobe downloads site, then Repair Permissions with Apple's Disk Utility, then re-install the latest and most current versions.  Finally, Repair Permissions with Apple's Disk Utility once again.
    Remember that Photoshop 14.x, which would have been "CS7", but now will be "CC", is scheduled to be released on June 17, less than two weeks from today,

  • How can I delete time machine back up from my computer hard drive

    How can I delete time machine back up from my computer hard drive?

    How to Delete a Time Machine Backup - YouTube
    If you want to remove an entire Time Machine backup on a backup drive, then the easiest way to do that is to erase the backup drive using Disk Utility. However, this will delete everything on the disk:
    Drive Erase Snow Leopard and Earlier
    1. Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    If you are preparing an external or a non-startup drive, then open Disk Utility in your Utilities folder.
    2. After DU loads select the volume you wish to format from the left side list. Click on the Erase tab in the DU main window.
    3. Set the format type to Mac OS Extended (Journaled.) Click on the Erase button and wait until the process has completed.

  • How do I delete an image of myself from an album cover?

    How do I delete an image of myself from an album cover? iTunes doesn't cover the removal and substitution of album artwork.

    Select file in iTunes.
    File > Get Info
    Artwork tab
    Click on artwork then "-"
    You can do somehting similar for a series of files if selected as a group and get Info.  Then click the artwork box tab to delete all artwork.
    Note proviso below:

  • How do i delete my credit card info from my phone. because it wont let me update or download apps because i only have 50 cents on the card

    how do i delete my credit card info from my phone. because every time i try to update or download apps it wont let me because i only have 50 cents on my card. so i need help now before i smash this ****** *** phone and go with a galaxy s5

    This does not make much sense.
    Please explain.
    Are you getting an error message?  What does it say?

  • How do i delete an old iCloud account from phone when I forget my password and I'm not able to reset it because my security questions do not match?! Help!! Currently not able to update any apps or icloud info

    How do i delete an old iCloud account from phone when I forget my password and I'm not able to reset it because my security questions do not match?! Help!! Currently not able to update any apps or icloud info...

    If your device is signed into an old ID of yours that is an earlier version of the ID you want to sign in with, do the following:
    If you are using iMessage and FaceTime, make sure you are signed into these services with your current ID.  If they are signed into the old ID, go to Settings>Messages>Send & Receive and Settings>FaceTime, tap the ID, sign out, then sign back in with your current ID.
    Then temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  (You should not have to verify the old email account so it doesn’t matter if you no longer have access to it.)  Now go to Settings>iCloud, turn off Find My iDevice and enter your current password when prompted (even though it prompts you for the password for your old ID).  Then save any photo stream photos that you wish to keep to your camera roll (unless you are using iCloud Photo Library).  When finished go to Settings>iCloud, tap Sign Out (or Delete Account if you are not running iOS 8) and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address back to the way it was.  Now you can go to Settings>iCloud and sign back in with your current iCloud ID and password (your data will download back to your device).

  • How can I delete  my credit card info from itunes?

    How can I delete  my credit card info from itunes?

    Changing Account Information  >  http://support.apple.com/kb/HT1918
    If necessary...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Re:How can we delete the concurrent node entry from the FND_NODE table

    HI ,
    11.5.10.2 on Oracle Solaris on SPARC (64-bit) .
    How can we delete the concurrent node entry from the FND_NODES table without running Autoconfig.
    Currently we are having 3 nodes RAC and we are deciding to remove one node from the RAC and all 3 nodes are registered as concurrent node with application but concurrent manager is running only on one node.
    Lot of the custom configuration we did it at application web tire level. If we run the Autoconfig at that time we need to redo those changes again that we are trying to avoid.
    Regards .

    we are trying to avoid to run FND_CLONE.setup_clean because it will delete all the nodes entries from the FND_NODES.If those entries are invalid then they should be deleted.
    Running AutoConfig after purging the table will populate it with the correct entries.
    In order to populate the nodes entries again we need to run autoconfig and it will change the server id in fnd_nodes and then we need to redo the ADI client configuration on users PC and redo all the changes that we made in jserv and webserver.For ADI Clients, you should use the correct server ids which will be populated in the table for you once you run AutoConfig.
    For jserv configuration, you can refer to (Customizing an AutoConfig Environment [ID 270519.1]) to make the preserve all your custom setup/configuration after running AutoConfig.
    If there any custom script to delete only one node from the fnd_node so that we don't need to run autoconfig after that, then I really appreciate.No.
    Thanks,
    Hussein

  • HT204053 how do i delete a multiple apple id from my account?  I only need one

    how do i delete a multiple apple id from my account?  I only need one and i have two listed

    Hello javyocks,
    Thanks for using Apple Support Communities.
    Concerning the issue with multiple Apple ID's, please look at the following:
    Frequently asked questions about Apple ID
    http://support.apple.com/kb/HT5622
    I have multiple Apple IDs. Is there a way for me to merge them into a single Apple ID?
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.
    Take care,
    Alex H.

Maybe you are looking for