Deleting Whole directory

Hi all
Can anybody help me with a piece of code for deleting all files (including dirctory) in a directory...
Thanks
Deepa K

have a look at this
http://javaalmanac.com/egs/java.io/DeleteDir.html?l=rel

Similar Messages

  • How to delete a whole directory in Contribute CS3

    Hello,
    Here is my problem :
    I've created a new page (html) in my site. This page contains
    some pictures.
    When I publish this new page, I choose a new directory to
    save it : "NewDirectory" for example.
    When I visit this new directory, I can see that Contribute
    creates an "images" directory and I can see my new html page.
    So, now I want to delete my (new) page. I know how to do
    that. But my problem is : how to delete the images.
    I can do delete them one by one but If I have a lot of image,
    it will be very long.
    Now my question : how can I delete a whole directory in
    contribute without having the following message:
    "CONTRIBUTE CAN'T DELETE THIS DIRECTORY. VERIFY DIRECTORY IS
    EMPTY" or something like that...
    Sorry for my bad english and thanks a lot for your help!!
    Victor

    Download FileZilla(free) and use FTP to delete the folder and
    its contents. Its not possible doing this using Contribute, even
    with 'Delete' permissions, you can only delete individual files
    that you're allowed to edit. I haven't found any admin-settings
    that allow you to delete folders with content (alas).

  • I am unable to delete whole texts from left-swipe. i click delete and they dissappear. But then i can't send or recieve texts. i reboot phone and deleted message reappear. i've synced, backup, everything. Help!

    I am unable to delete whole texts from left-swipe. i click delete and they dissappear. But then i can't send or recieve texts. i reboot phone and deleted message reappear, but i am able to continue send/recieving texts.. i've synced, backup, everything. Help! I am doing this beacuse in my space on my phone my doucments and data are taking up 9GB of space, and i don't know why other than in my phone it says messages are taking up 8GB or so. I am running ios 7.0. I have synced my phone with itunes, backed up, reboots after deleting the texts, they never vanish, i have even restored from itunes and restored from a backup that didn't include the texts after i deleted them.

    actually better to reset your phone and reinstall the latest firmware again after that restore your back up it should be ok

  • Is there a way to delete a directory with files in it?

    I am working on a program right now, and i need to know if there is a way to delete a directory that has files in it?
    or do i have to write another program that gets the list and deletes each file individually? if this is the solution, how do you do this?
    Right now, i would prefer some of the logic and some "code snippets" but please do not write the entire code out for me.
    thank you.
    (snippets include how to poll, and how to call the polled item so i can delete it...)

    Right now, i would prefer some of the logic andsome "code snippets" but
    please do not write the entire code out for me.So I assume this is some sort of "homework" (maybe
    self imposed).
    You can't use File's delete() to delete a non empty
    directory as I guess you
    have discovered. So basically, yes, you have delete
    each child file
    separately and then delete the directory.
    But it gets worse. The directory may itself contain
    directories and these may
    not be empty...
    There's a fairly extensive snippet here:
    http://www.exampledepot.com/egs/java.io/TraverseTree.h
    tml which shows
    how you can "visit" every file and folder inside a
    given folder (children,
    grandchildren etc) and "process" them. It may help -
    but be warned there's
    a nearby example which more or less solves your
    problem.Um, did my post above get covered with lemon juice or otherwise become invisible?
    Jakarta Commons IO FileUtils already does the job.

  • Active Directory + Resource action to delete home directory

    Hi all,
    I am trying to delete home directory from the disk physically after the user is deleted from AD. I followed the link http://docs.sun.com/app/docs/doc/820-6551/bzbuc?a=view and implemented the delete resource action as mentioned in the link.
    here are the steps i followed (For testing, I mentioned delete >> C:\test.txt to see if it deletes the text file)
    1. Enter delete after action in the Identity Manager User Attribute column of the resource’s schema map.
    2. In the Attribute Type column, select string.
    3. In the Resource User Attribute column, enter IGNORE_ATTR. Leave the Required, Audit, Read Only, and Write Only columns unchecked.
    4. Add this to the Deprovision Form user form after the </Include> tag:
    <Field name= ’resourceAccounts.currentResourceAccounts[AD].attributes.
    delete after action’>
    <Expansion>
    <s>AfterDelete</s>
    </Expansion>
    </Field>
    5. Create the following XML file and import into Identity Manager. (Change file paths according to your environment.)
    <?xml version=’1.0’ encoding=’UTF-8’?> <!DOCTYPE Waveset PUBLIC
    ’waveset.dtd’ ’waveset.dtd’>
    <Waveset>
    <ResourceAction name=’AfterDelete’>
    <ResTypeAction restype=’Windows Active Directory’ timeout=’6000’>
    <act>
    echo delete >> C:\test.txt
    exit
    </act>
    </ResTypeAction>
    </ResourceAction>
    </Waveset>
    6. Edit the XML for the Active Directory resource and add information to the “delete after action” schema mapping. Here is an example of a complete schema mapping for this resource with the new additions. (You will be adding the views-related information.)
    <AccountAttributeType id=’12’ name=’delete after action’ syntax=’string’
    mapName=’IGNORE_ATTR’ mapType=’string’>
    <Views>
    <String>Delete</String>
    </Views>
    </AccountAttributeType>
    To test, I deleted a user from AD and I was expecting the file c:\test.txt to be deleted as it invokes the Resource action after delete. Has anyone been successful in deleting the home directory from drive after the user is deleted. Any pointers or help
    Thanks,
    Ani

    Hi Gaurav,
    I have to implement Resource Action functionality for Solaris system. I followed the link http://download.oracle.com/docs/cd/E19225-01/820-6551/bzbuc/index.html and the first message of this thread. I am using 8.1 IDM.
    But unfortunately I can’t trigger any bash commands on the resource like echo deleting of user wiht next name - $WSUSER_accountId >> /tmp/resultFile.txt.
    There are any errors on log file.
    Can you share your work configuration and steps to reproduce?
    I have done next but Resource Action doesn’t triggered:
    1. My Action:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
    <Waveset>
    <ResourceAction name='AST-ResAct-SOL-AfterDelete'>
    <ResTypeAction restype='Solaris' timeout='6000'>
    <act>
    #!/usr/bin/bash
    echo deleting of user wiht next name - $WSUSER_accountId >> /tmp/resultFile.txt
    exit 0
    </act>
    </ResTypeAction>
    </ResourceAction>
    </Waveset>
    2. Added next line to “Deprovision Form”
    <Field name='resourceAccounts.currentResourceAccounts[SOLARIS 10].attributes.delete after action'>
    <Expansion>
    <s>AST-ResAct-SOL-AfterDelete</s>
    </Expansion>
    </Field>
    3. Added a new attribute mapping on the resource:
    <AccountAttributeType id='12' name='delete after action' syntax='string' mapName='IGNORE_ATTR' mapType='string'>
    </AccountAttributeType>
    4. Assigned role (this role provisioned resource to user) to user, delete user from resource via Deprovision IDM page. But my Action commands didn’t trigger on resource.
    Thanks’ in advance!

  • How can I copy the whole directory of files from PC to iPad?

    How can I copy the whole directory of files from PC to iPad ?

    Get an app that reads PDF's, such as iBooks or GoodReader or Readdle Docs, then use the file transfer part of iTUnes to get those files to your iPad, through iTunes. ( I have no experience with goodreader, but with ReaddleDocs you can move the files, then create folders to put them in to keep them organized)

  • How do I delete home directory /Library/Preferences/Macromedia/Flash\Player ?

    How do I delete<home directory>/Library/Preferences/Macromedia/Flash\Player?

    Note that it'll be created over every time you load a Flash object in a Web browser (at least if it has Flash enabled).
    The only way to consistently get rid of all its content would be to create an AppleScript, or use Automator to create a workflow that would empty this folder when you close the browser.

  • How to delete whole days of events

    Is there anyway to delete whole days worth of events. I had one event mess up when syncing to MobileMe and it made one event 472 times on multiple days. But I don't know how to delete days worth of events without going through for each one. Is there a way? And if so how? Thanks.

    Sunil,
    Do like this
    Delete <DBTABLE> where <Keyfield> is initial.
    Commit work
    Regards,
    Satish

  • How to delete whole projects....

    I am trying to free up space on my computer so I can install some graphic design software, and I just want to know how I delete whole logic projects that I dont need anymore. Thanks for your help.

    simply drag the Logic song folder to the trash... then empty the trash.
    This will delete all audio files (the biggest space consumer), as well as the Logic song file, its back-ups, and any subfolders contained within.

  • Deleted Sysman Directory

    Hi
    I had accidentally deleted 'SYSMAN' directory under ORACLE_HOME, i donot have a backup.
    I tried Oracle Universal Install, no results.
    I am unable to configure the dbconsole, is there any way to getback the directory.

    You can try it by copying the directory from another host. But the "proper" way would be reinstallation.

  • Cant delete User Directory !

    I am managing our students on our xserve with 10.6 running. When they are leaving i delete the student on our server with the workgroupmanager but i cant delete his directory. Our file sharing is AFP based.

    Hi Craig
    Is this what you need? > http://support.apple.com/kb/HT1428
    Dennis

  • Delete AL11 directory

    Hello,
    On SAP R/3 4.6c, I want to delete a directory from AL11. Not delete content but only remove logical link.
    Does anyone know how I can do this ?
    many thanks

    Hi,
    I've got half an answer, and while I've not been able to use it to delete a directory from AL11 I think the potential's there.
    In AL11 highlight a directory on the list and choose 'Configure'.  Now the fun starts, then next screen hasn't actually pulled through the line you selected, but it does have an option to delete on the menu.  So if you could fill the three fields with the right values you could potential delete a directory.
    Like I said, half an answer but hopefully it will set you in the right direction.
    Regards,
    Nick

  • Delete Library Directory

    Hi, I uninstalled an application and its uninstall instructions tells I have to remove some files (belonging to that application) from my home Library directory. Attending to the purpose of the files stored at Library, is there something wrong in deleting all the contents?
    Thank you very much, and sorry for my English

    what you need to delete is the folder for that application in home directory/library/application support. that's quite harmless. but don't delete the whole library folder.

  • How to find out who deleted the directory in Unix

    Hi Experts,
    In my system some body tampered the directories, and more over some body deleted the bin directory under the /usr/sap/trans in Unix operating system. now i am checking to find out who deleted and for the more logs.
    i am unable to find out the user name and deleted directory logs..i know its completely related to the unix level but mean time i am searching for the same.
    Any ideas and clues will be heighly appreciated.
    -Srini

    To know the OS would have been helpful
    First ask the people around you if anybody did it, maybe he is man enough to admit...
    Try to find out who logged at the time when the directory was deleted.
    - check the OS syslog (/var/adm/syslog/syslog.log for hp-ux, /var/log/messages for linux)
    - try the last commando to get a list of who logged on when
    - check the command histories of the sidadm, root user, use the history command, or the h alias
    - check if there are scripts running, which regularly delete files
    As the trans directory might be NFS mounted to other servers, you might need to do the checks there too.
    Best regards, Michael

  • Is ther a way to quickly delete whole albums in the music app in iOS 7?

    I often download new music and need to remove old music to make space.  I use Match, so I almost never sync with a computer these days, and even when I do I don't manage my music that way.  The music app in iOS 7 seems to have no way to delete albums, just individual songs.  This is very tedious when I want to remove one album and replace it with another album.  Happily, I can still download a whole album with one tap.  Has anyone found the secret to deleting albums?

    it looks like they took out the "Show" option under Mail settings completely and added a Flag choice instead. Don't know why.
    apple.com/feedback

Maybe you are looking for

  • Clarification on QT Pro

    I just want to make sure I understand all this correctly. I am using Final Cut Express 1 and DVD Studio Pro 2, primarily on a Mac Mini using OS 10.3.9. The original QT Pro key supplied with DVD Studio was for 6.3 I believe. I must have inadvertantly

  • Mass post with clearing

    Hello experts, please, is it possible in some easy way to post with clearing multiple documents at one time? We have 1000 documents numbers in XLS which can be cleared at one time. In F-04 or FB05 is possible just to paste 26 document numbers at one

  • How to set serial no in jasper report

    Hi friends, I am using jasper report in my application. In the table has 4 fields like code,name,address,phone number. If i generate the report i need to display the serial number like1,2,3.... for each record. I don't know how to set. So please help

  • Solution manager system landscape(SMSY) configuraion

    Can any one help me how to add the r3servers in solution manager landscape.Also plz tell me the Logical component creation is needed for this one.

  • Custom Presets Don't Work

    I can save a custom preset, but when I load it, it has no effect on the sound. I have to load default effects and tweak them every time. Is there a way to troubleshoot this and get it working properly? Audition CC Mac OS 10.8.2