How to delete a file using checkbox!!!

i'm developing one project using the file operations implementations. I'm displaying the contents of the file in my jsp page. The first column i've putted a checkbox option and at last i've created the button. If i clicked that particular checkbox and then if i press the delete button then it should be able to delete the all check marked files from the directories.
Could anyone tell me how to do this in jsp. Is there any need for javascript or it can be done only through the jsp codings.
in advance thanks....

<html>
<head>
<title>Delete All Example</title>
<script>
function DeleteAll(){
     var answer = confirm("Do you really want to delete these selected files?")
     if (answer != 0) {
          for(var i=0; i<3; i++){
               if( (document.form1.filecheck(i).checked == true) && (document.form1.filepath(i).value != "") ){
                    var fso = new ActiveXObject( "Scripting.FileSystemObject" );
                    fso.DeleteFile(document.form1.filepath(i).value, true);
</script>
<body>
<form name="form1">
<table border="1">
<script>
for(var i=0; i<3; i++){
     document.write("<tr><td><input type='checkbox' name='filecheck' value='filecheck'><br></td><td><input type='file' name='filepath'></td></tr>")
</script>
<tr><td colspan="2" align="center"><input type="button" name="go" value="Delete All" onClick="DeleteAll()"></td></tr>
</table>
</form>
</body>
</html>Cheers

Similar Messages

  • How to delete a file in blod storage using mobile service

    This
    link shows how to add a file using windows phone 8 mobile service. I would like to know how I can delete the file once it is stored in the blob storage. I have typed following codes by using existing resource name and image url after the file has been successfully
    uploaded and although I do not receive any errors, the file does not get deleted in the storage either:
    CloudBlockBlob blobFromSASCredential =container.GetBlockBlobReference(todoItem.ResourceName);
                    await blobFromSASCredential.DeleteAsync();
    Can anyone help? I am using 3.0.2.0 Thank you.

    Hi,
    If use above code to delete other blob file, does it success? see more:
    how to delete azure blob storage , please consider this factor, Storage Emulator 2.2 is currently incompatible with Storage Client Library 3.0.0.0. This has been mentioned in Storage Team Blob as well:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors-json-minute-metrics-and-more.aspx (Please read "Storage Emulator Guidance" section towards the end of the post). and there is a
    beta version of the next storage emulator available that does work with v3 of the storage API dlls: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/01/27/windows-azure-storage-emulator-2-2-1-preview-release-with-support-for-2013-08-15-version.aspx .
    If I misunderstand, please feel free to let me know.
    Hope this helps
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do I delete a file using Xterminal?

    Hi , recently in the interest of playing Doom thro my N900 - I copied 3 wad files thro xterminal to opt/doom/wads..
    Now i guess this is occupying my root memory? do you know how i can delete the files using Xterminal. pls let me know
    thx.

    if it is in /opt, it shouldn't be!!
    /opt is actually linked into /home
    /home is a 2GIG partition on the EMMC that stores /opt (for optified packages.. all packages you download should sit in /opt) and all your settings / content (like address books and conversations)
    To delete it using an x terminal, you really mean using a shell.. the shell is what you see inside the x terminal..
    cd /opt/blah/dir
    rm filename
    rm is delete.. or more accurately remove!! It came in a time when keypresses were expensive
    cp is copy
    mv is move /rename
    ls is list (as in dir)
    df is diskspace free
    du is diskspace used (as in by a file or directory)
    there are loads of things like that
    be careful.. rm is the easiest way to ruin a system!

  • How to delete a file by using batch file

    hi
    i tried for deleting a file from batch filr in Linux environment.
    it is working when i run batch file thruogh command line.
    but its not woking through program.
    i am sending tha code that i used in tha program.
    First i have to create the file and send the information to that file
    and the content from taht file after that i have to delete the file.
    For that i wrote code but the batch is not woking.
    Batch file
    @echo off
    rm filename
    Actual Program Code
    I used RunServer
    public class RunServer extends Object
    RunServer();
    String cmdServer = "test.bat";
    Runtime run = Runtime.getRuntime();
    Process p = null;
    try
    p = run.exec(cmdServer);
    catch(IOException e)
    System.out.println("Error:"+e);
    By using RandomAccessFile i am creating a file
    please help me
    Thankyou

    1) You can't execute a batch without having a shell.
    2) It's totally stupid to run a one-line batch file from system.exec.
    3) It's also totally stupid to delete a file using Runtime altogether.
    But there you go...

  • Question:  why isn't how to delete a file available.

    How come you have to search for the information on how to delete a file from Adobe Reader.   This should be in the instructions on how to use with how to download.  Does anyone agree?

    If it is a system file and even if the file is corrupted, it cannot be deleted.
    Try reinstalling phone software using Nokia suite if the phone supports Nokia suite and an USB port.
    -------------------If this post helped you, click on accept as solution.------------------
    -----------------------------Appreciate by clicking on white star.----------------------------

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • How to delete recent file history in adobe reader in Mac PC ?

    How to delete recent file history in Adobe Reader in Mac PC ?
    In Adobe Reader - Edit - Preferences - select Documents in the left panel and change the "Documents in recently used list" to 0. Yes ! the file history is gone But when you set back the value, you will see the file history again. This is not the way to do...
    I have checked all the preference or setting. I couldn't found any clear recent file history in adobe reader.
    Please help ! Thanks !

    First off, you CANNOT set recent documents to zero. The absolute minimum it will accept is 1. And on my MacMini, (I just checked it to be 100% sure) I opened seven documents with Recent Docs set to 10 - they were ALL listed. I set it to 1 and all but the most recent cleared. I then closed Reader and reopened it. The list was 1 item. I reset Recent Docs to 10 and there was still only 1 item in the list.

  • How to Delete Multiple Records using selectbox in jsf

    Hi!
    My Senario is I want to delete multiple records using checkbox. After selecting multiple records when i click the delete button the selected
    rows shuld be deleted.if am doing like this but the edit ,delete for each row functionality is not working.
    <h:selectBooleanCheckbox id ="bcb" value="#{item.empno}">
    </h:selectBooleanCheckbox>
    But other functionality is not wokring.
    Can any one plz tell how to select the multiple records and how to send the id to the serverside.
    I want code code for jsp and as well as backingBean how to accaess .
    Any Reply shuld be apreciated

    You may find this article useful as well: http://balusc.blogspot.com/2006/06/using-datatables.html
    Check the chapter "Select multiple rows" for two generic ways to select multiple rows in a datatable.

  • How to delete archivelog file at standby database

    Hi All,
    I'm running Physical Standby Database on ASM. At standby database, I can see all logs using asmcmd:
    ASMCMD> ls
    thread_1_seq_14.330.625772527
    thread_1_seq_15.346.625772527
    thread_1_seq_16.329.625772527
    thread_1_seq_17.327.625772559
    thread_1_seq_18.324.625772599
    thread_1_seq_19.341.625772367
    thread_1_seq_2.325.625772329
    But when I run RMAN to delete all these archivelogs, its give me error:
    oradr:/u01/app/oracle$rman rcvcat rman/rman@rman target /
    Recovery Manager: Release 10.2.0.3.0 - Production on Thu Jun 28 13:50:41 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: AIXDB (DBID=2438430915, not open)
    connected to recovery catalog database
    RMAN> delete archivelog all;
    Starting implicit crosscheck backup at 28-JUN-07:01:50:56
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of delete command at 06/28/2007 13:50:56
    RMAN-12010: automatic channel allocation initialization failed
    RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
    RMAN> register database;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of register command at 06/28/2007 13:51:06
    RMAN-08040: full resync skipped, control file is not current or backup
    Even it is not registering it. So how to delete archivelog file at standby database.
    Thanks in Advance
    Rakesh

    This appears related to Bug 3298797 that was supposed to be fixed in 10.2.0.1. The workaround is to switch over to the standby, register the standby and then switch back.

  • How to delete  Plugins files in Library

    Hello guys.
    I am using AU plugins called Aalto .I saved files.
    That makes Logic keep crashing.
    So I wanna deleted the files I saved.
    I try to find a folder to removed it but I cound not find it .And try reinstall plugins and loading again but still the files is there. I dont get it.
    Can somebody help that how to delete the file  " Test version recoding ,Welcome to Aalto."?
    Please help.
    Thanks.
    Luna
    CCCcan

    If the cache path is to this folder then go with purging or else stop bi service and delete

  • Very Urjent: How to delete temporary files on the server.

    EBS:
    We are facing a big issue with huge volume of temporary directory.We have created invoice program which uses Bursting concept. Every concurrent program is erroring out. How to delete those files automarically.
    Where these temp files are getting stored. How can we delete them once the concurrent request is completed.
    Please help me..its a huge issue. Thanks in advance.

    Sorry Steven,
    I saw your solution. Thanks for that. But I just want to know, do we have any setups in XML Publisher Administrator or bursting control file to delete the files automatically once the concurrent request is completed.
    And one more thing I found is, In the xml administrator, General properties i have specified the temporary directory as '/tmp'. But all the temporary files are loading in '$XDO_TOP/temp' directory. Why is this..

  • How to delete music file that is not downloaded into iTunes?

    Im having a problem deleting a file I asked to open a music file, with itunes.
    I was on a site called mp3skulls trying to listen and possibly download a file. I accidently requested it to be opened with itunes and as it did open with itunes and played. I can't simply delete it. It's not downloaded into my mac nor is it downloaded into itunes. It seems like it is being streamed from the site onto my itunes. I tried to find a delete option but there isn't one and i tried just dragging it to my trash can but it is still there playing.
    there is a symbol right in front of the name that looks like this ((.)) (there's a dot in the middle) if that helps anything.
    I just need to know how to delete this file cause i do not want to keep it.
    Thank you!

    If it is a system file and even if the file is corrupted, it cannot be deleted.
    Try reinstalling phone software using Nokia suite if the phone supports Nokia suite and an USB port.
    -------------------If this post helped you, click on accept as solution.------------------
    -----------------------------Appreciate by clicking on white star.----------------------------

  • Anyone knows how to delete a file from a directory?????

    hi there
    anyone has any idea on how to delete a file from a directory? delete(String filename)? thank you.

    Hi,
    Check this link.
    Gives you an example code to show how to delete a file.
    http://examples.oreilly.com/jenut/Delete.java
    Hope this helps.
    Roopasri Vittal
    Developer Technical Support
    Sun Microsystems
    http://sun.com/developers/support

  • How to delete a file in Keynote Remote for iPhone4?

    Any one know how to delete a file in Keynote remote app for iPhone4? I uploaded a Keynote file from iDisk to my iphone and I can't delete the file. The file does not show up when I connect my phone to iTunes.
    I also cannot connect my Iphone to Keynote anymore because of this file.

    The file is actually in the Keynote app and not the Keynote remote app for iPhone.

  • In adf,how to delete a file generated on server,when the webpage is closed

    Hi,
    I have an application consisting of 2 pages. in the 1st page i will give some input details and when i click on submit, some java code is getting executed in the back. That java code generates a csv file in the server location. after succesful execution of java code, i was redirected to 2nd page. In 2nd page, i am giving option to download and when the user clicked on download button and after the file is downloaded -- in the backend i am deleting the file from the server. Till this point everything is fine. But if the user didnt click on the Download button and instead if he closes the browser, the csv file gets remained on the server itself. This is the issue i am facing .. I am not able to get an idea in ADF Framework, how to delete a file when the browser is closed. Please help me out in this.
    Thanks in advance !!!

    ADF has nothing to do with tracking browser close buttons. What you can do is call a JS function and call the method which deletes the file from within the JS function. ADF has a component for calling java code from JS call.

Maybe you are looking for

  • How do I install Safari on 10.6.8?

    Recently Safari started acting up. It kept crashing immediately after launching it. Every single time. This actually happened once before, after I installed new memory from Crucial, so I deleted Safari and downloaded it again from Apple.com. I don't

  • Report painter- business area and Cost center

    Hi All, we have a requirement to create the Report painter report where in the Revenue will be By business area and cost of the particular cost center by Cost element. i.e revenue by Business area against cost by department. It it possible to use rep

  • Users not visible in "Edit permissions..." in workspace

    Hi there, I have created several users using user management console (we are using native directory). Users can log into workspace and working in it. But I have problems with defining permissions for folders/reports in workspace. In "Edit permissions

  • Safari 5.1.1 missing plug-in html5

    I just did the Lion OS 10.7.2 with Safari 5.1.1 When I attempt to watch the new video about iCloud on the Apple website, the video viewing screen is blank with "Missing Plug-In" or just 'HTML5" What plug-in could be missing? Think I figured this out.

  • Show Report Variable in the title

    Hi all, I need to know if it's possible to show in a title of Answer a report variable and, if it's possible, how can I do. Thanks a lot Steve