How to upload the files of a directory to a server at one time?

in a jsp page ,the user choose a directory ,then I want to upload the files of the directory to a server at one time.How to do this?Thanks!

You create multiple file input fields and you have them select each file they want.
Or tell the user to zip the directory and upload the zip file.
Or use a signed applet to get all the files and send them.
There's no way for the browser to select a directory.

Similar Messages

  • How to upload the files

    how to upload the files from javascipt.can any body send the code for that.

    You can't upload files with Javascript, that would be a huge security hole. At highest you can use Javascript to submit a form with a file field, but the user still have to select the file himself.

  • HOw to upload test files in XI directory

    Hi all,
    I want to upload test file from my local system to XI directory. how can i do this. There is one customized transaction cg3z for this . but consider that this is not available in my case. Is there any alternative way to upload the file in to XI directory.
    Thanks and Regards
    Sachin Sharma

    Hi,
    if client and server are in same network the u can configure your file adapter using NFS protocal.
    if they are in different network the you can upload using SXDA_TOOLS tcode.
    The porcedure to put a file on server is as shown below:
    1. Save your file in your local machine.
    2. In XI server, enter the tranaction code "SXDA_TOOLS".
    3. In the input screen, enter:
    i) Object Type "DXPROJECT".
    ii) Program Type "BAPI".
    iii) Program "CREATE".
    4. Press Copy (Ctrl+F5) button.
    5. Now, you will get another screen in which you will see 3 blocks called as "Source", "Target" and "Copy with/without conversion".
    6. In Source block, choose the radio button "Presentation Server" and then take F4 help to select your source file. (file which you have saved on your local machine)
    7. In TARGET block select the radio button "Application Server", check the box "Remote server" and take F4 help to select your application server.
    8. In the same block under "File Type" select "P physical file name" and under "File Name" write the path/directory name which you have mentioned in your communication channel along with the file name.
    Example: suppose file name in your Comm Chanel is "demo.xml" and directory path is "/abc/testfiles/XML/", then in step 8 write "/abc/testfiles/XML/demo.xml".
    Note: need not to do any thing in 3rd block.
    Regards,
    pradeep A.

  • How to upload the file from website into R/3

    Dear Experts,
              I want to post the data in r/3 using bdc.but flat file is available in some website for eg.'www.sap.com'.how to retrieve the flat file from the website and how to upload the data from website to r/3.
    It is very urgent please help me.
    Thanks & Regards,
    Ashok.

    Hi Ashok,
        We cannot directly pulled data from website. we need to activate webservices and rfcs. Better you could asked to your Basis guy that he knows or not. If not then do sdn you will get the appropriate answer. I can only say that its possible and we can download from website.
    Regds,
    Rakesh

  • How to upload the file without using java components?

    Hello,
    I need to upload the file using JSP, but I don't want to use java componets(such as
    jspsmart).
    Who can tell me how to realize it? This issue is very important to me,
    thanks all in advance!

    make you're own servlet using the multipartrequest from o'reilly.
    easy and simple, no jspsmart, only 1 jar file and some descent programming.
    I use it like that...

  • How to upload the file in the virtual disk?

    I have created a virtual drive called Z.But I don't upload file(image).
    I could not find how to write the file path.
    <cfif len(attributes.background_file)>
    <cfset upload_folder =( ".....")">
      <cffile action = "upload"
        fileField = "background_file"
        destination = "#upload_folder#"
        nameConflict = "MakeUnique"
        mode="777">
      <cfset file_name = "#createUUID()#.#cffile.serverfileext#">
      <cffile action="rename" source="#upload_folder##cffile.serverfile#" destination="#upload_folder##file_name#">
    <cfif isdefined("attributes.old_background")>
      <cf_del_server_file output_file="settings/#attributes.old_background#" output_server="#attributes.old_background_server_id#">
    </cfif>
    </cfif>

    I adduce that my computer disk screen. if I want to upload file to virtual file system  Must I create a RAM disk-based file.Because all codes include ram://?
    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSe9cbe5cf462523a0-70e2363b121825b20 e7-8000.html
    I aduce my computer disk screen. My virtual disk name is Z.Dou you have any idea abaut this subject.
    I apologize to anyone.

  • How to upload the files using struts

    Hi all
    My requierment is to upload the files from the client machine and save it on the server, the file size must not increase more than 250 MB and to validate that we cannot do validation on the client machine so we have to validate it on the server side. below is my code kindly go through it if there is any problem in Bussiness Logic
    1>Upload.jsp
    2>UploadForm.java
    3>UploadAction.java
    *1>Upload.jsp*
    <%@ page language="java"%>
    <%@ page import="java.io.*"%>
    <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
    <html>
    <body bgcolor="white">
    <form name="uploadForm" action="TestApplication/upload" method="post" enctype="multipart/form-data">
    <table>
    <tr>
    <td align="center" colspan="2">
    <font size="4">Please Enter the Following Details</font>
    </tr>
    <tr>
    <td align="left" colspan="2">
    <font color="red"></font>
    </tr>
    <tr>
    <td align="right">
    File Name
    </td>
    <td align="left">
    <input type="file"  name="theFile">
    </td>
    </tr>
    <tr>
    <td align="center" colspan="2">
    <input type="submit" value="UPLOAD">
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>*2>UploadForm.java*
    package com.MyPack.Datamatics;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.upload.FormFile;
    public class UploadForm extends ActionForm
         private static final long serialVersionUID = 1L;
    private FormFile theFile;
       public UploadForm(){}
       * @return Returns the theFile.
      public FormFile getThefile() {
        return theFile;
       * @param theFile The FormFile to set.
      public void setThefile(FormFile theFile) {
        this.theFile = theFile;
    } *3>UploadAction.java*
    package com.MyPack.Datamatics;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.upload.FormFile;
    public class UploadAction extends Action
      public ActionForward execute(
        ActionMapping am,
        ActionForm af,
        HttpServletRequest req,
        HttpServletResponse res) throws Exception{
         UploadForm myForm = (UploadForm)af;
            // Process the FormFile
            FormFile myFile = myForm.getThefile();
            String contentType = myFile.getContentType();
            String fileName    = myFile.getFileName();
              int fileSize       = myFile.getFileSize();
              String data="";
              try{
            java.io.InputStream fileData  = myFile.getInputStream();
             String path="E:/store";
              File f = new File(path);
              java.io.OutputStream outputStream = new FileOutputStream(f+"/"+fileName);
              int temp = 0;
              byte[] buffer = new byte[8192];
              temp = fileData.read(buffer, 0, 8192);
              while ((temp) != -1) {
              outputStream.write(buffer, 0, temp);
                   outputStream.close();
                   data = "file has beeb written to E:/store" + fileName;
                   fileData.close();
              catch (FileNotFoundException fnf)
              { System.out.println("Cannot Found the file");
               System.out.println(data);
              System.out.println("contentType: " + contentType);
             System.out.println("File Name: " + fileName);
             System.out.println("File Size: " + fileSize);
          return am.findForward("success");
    }Thanks in Advance

    [help link 1|http://www.roseindia.net/struts/strutsfileuploadandsave.shtml]
    [help link 2|http://www.roseindia.net/struts/strutsfileupload.shtml]

  • How to list the files in a directory which are recently modififed few mins

    Hi,
    I need command to list the files in a directory which are modified few minutes ago in SunOS. like "find . -cmin 2 -print " which list files that are modified 2 mins ago in Linux platform.
    Thanks in advance.
    sudha85

    The find command that comes with solaris doesnt have the cmin operator. Only mtime whose option is days.
    So install gnu find from sunfreeware which is the same one that comes with linux.

  • How to Upload the files into the SiteAssets Library by SharePoint Hosted App Model

    I want to upload the Jquery and supported files in to the Site Assest library by SharePoint Hosted Apps,
    I have created a SharePoint Hosted App, added the files in the Modules
    <Module Name="ZoneTabsFiles" Url="SiteAssets">
    <File Path="ZoneTabsFiles\jquery-1.11.2.min.js" Url="jquery-1.11.2.min.js" ReplaceContent="TRUE" />
    <File Path="ZoneTabsFiles\jquery-ui.css" Url="jquery-ui.css" ReplaceContent="TRUE" />
    <File Path="ZoneTabsFiles\jquery-ui.min.js" Url="jquery-ui.min.js" ReplaceContent="TRUE" />
    <File Path="ZoneTabsFiles\ZoneTabs.js" Url="ZoneTabs.js" ReplaceContent="TRUE" />
    </Module>
    The Apps is successfully getting activated but the files are not visible,
    Similarly I want to upload the .webpart file to webpart catalogs.
    <Module Name="ZoneTabsWebpart" List="113" Url="_catalogs/wp" Path="lists\wplib" RootWebOnly="TRUE">
    <File Url="ZoneTabs.webpart" ReplaceContent="TRUE" />
    </Module>
    The Functionality I can achieve Provider Hosted app, but Can it be done by SharePoint Hosted apps,
    Currently the app has the permission of Full Control on Site and Web 
    Thanks in advance

    Hello Ashok,
    you can use JSOM to provision the webpart files in SharePoint hosted app.
    Please see the below article for more details.
    http://www.sharepointnutsandbolts.com/2013/05/sp2013-host-web-apps-provisioning-files.html
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • How to get the file name from directory

    Hi,
    I have a directory called test inside i have only one .txt file. i dont know that file name.
    Is it possible get the file name using PL/SQl code. ???
    Using that .txt file i have to create a dynamic table.
    If i have use *.txt also not working
    Anyone suggest me its possible to do or not????
    Cheers,
    Shan

    Hi Saubhik ,
    Wheni execute the function i am getting the following error
    Warning: compiled but with compilation errors
    Errors for FUNCTION LISTDIR
    LINE/COL                                                                       
    ERROR                                                                          
    7/3                                                                            
    PLS-00201: identifier 'DBMS_BACKUP_RESTORE.SEARCHFILES' must be declared       
    7/3                                                                            
    PL/SQL: Statement ignored                                                      
    8/54                                                                           
    PL/SQL: ORA-00942: table or view does not exist                                
    8/20                                                                           
    PL/SQL: SQL Statement ignored                                                  
    10/11                                                                          
    PLS-00364: loop index variable 'EACH_FILE' use is invalid                      
    10/2                                                                           
    PL/SQL: Statement ignored      Cheers,
    Shan

  • Problem in uploading the file of internal table into appliaction server

    i want to send the data of internal table to application server through selection screen and in selection screen and in selection screen parameter it should show the path of application server and through that path internal table data should go to application server , if possible give the code

    Hi,
    form download_file_appl_server.
      open dataset p_dlf2 for output
              in text mode encoding default .
      if sy-subrc ne 0.
        message:i005 with text-415 text-407.
      endif.
      loop at i_final into wa_final.
        transfer wa_final to p_dlf2.
      endloop.
      close dataset p_dlf2.
    endform.                    " OPENDATA_CLOSE
    where p_dlf2 is the seelction screen parameter which give the application server file path
    You can use this code for ur purpose.
    Reward if useful.
    Regards
    Shibin

  • How to get the files related to a module from server

    Hi,
    I am facing a problem. i have to extends controller but it has lot of imports from the same module but different folders. and all the files are in .class files. Can you tell me a process where i can download onto my local system from the server all the files from server and they are converted back to java files. Can i also get the xml files onto my local system.
    Please help me on this. are there any tools which can do this? plz share links.
    Thanks in advance.
    Regards,
    Prakash

    Prakash
    Its better through any tools (such as(WINFTP or WINSCP) you copy all the package structure into your local machine.For decompling all files in one go you can make use of JAD that is easily downloadable over net.
    http://www.varaneckas.com/jad
    Hope it helps!!!
    Thanks
    AJ

  • How to copy the file from firebird database to SQL server

    Hi all,
    I have a file in Fire bird Database (30 GB with .ydb extension).  which needs to be restored to SQL Server. I Have created a linked server and done it but it is taking very long time to update the
    records. Can any one please suggest if u have any alternate method to do this.
    Thanks in Advance
    Regards,
    Balaji Prasad B
    Balaji - BI Developer

    Can you try doing it in two steps?
    1. Downloading file to a shared folder path
    2. Uploading file from path to SQLServer using bulk options like OPENROWSET...BULK
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Name of the file in a directory

    There is a file in a directory say C:\abcd
    I want to find the name of the file in that directory.
    There is only one file in that directory
    How to proceed with this

    Sarma,
    That was a little abrupt and rude of you. Oracle_Friend was only asking if anyone knew of a way to detect the existence of a file in a directory, not exactly asking the world of us. And for all you know he probably has already searched in documentation, but probably isn't quite sure what to look for.
    Remember : The manual has every damn thing that you want. We can only help you when you are stuck somewhere after having treid many options.a) sometimes people don't know what options to try so how can they have tried many options before posting on here.
    b) The manual doesn't have every damn thing that you want. I want a lot of money and some lunch cos I'm getting hungry, but it doesn't have that. On a serious note though, the manuals do miss things and can't possibly cater for everybody's business requirements.
    Chill out man, and help rather than hinder.

  • Bad file number - comes when i upload the file

    While i tried to upload the file more 300 kb (any file type)to 2 apache server using nfsmount (nfsmnt-apache 1 and nfsmnt2 -apache 2) through weblogic 9.2 (it is running in linux), i got the following exception, but less 200kb file i can upload the file (any type) to both apache server.
    java.io.IOException: Bad file number at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:177) at
    anybody known this prob, pls help me

    Suggestion: read [the documentation|http://commons.apache.org/fileupload/using.html] for it.
    By default it will store files in memory up to about 10k. Larger than that will be written to disk.
    If you are really worried about memory, perhaps you should take a look at the [streaming API|http://commons.apache.org/fileupload/streaming.html]
    How large are the files being uploaded?
    How many users are we talking about?

Maybe you are looking for

  • Saving Pages document iCloud Mac at the same time?

    I recently bought Pages, Numbers, and Keynote. I like them a lot, but am running into some logistical issues. The biggest one is that I love saving to the Cloud - all my stuff is safe, especially since my harddrive has been replaced once and is alrea

  • Applet not displaying in the japanese Windows XP

    I have a applet which runs well in English version of WIN XP, but when the same applet is run on the Japanese WIN XP it does not show up. I have installed the latest version of Japanese JVM. Any help will be appreciated Thanks

  • Java Software Development Kit (SDK) for Java 6 on Leopard.

    Does anyone know if the Java Software Development Kit (SDK) comes with Leopard, or if one needs to sign up for an Apple developer account to obtain it? I typed the following command on the Terminal command line:      javac The output of that command

  • Software Prerequisites in managed system configuration are not fulfilled

    Hello dear Forum, I'm facing a problem when I configure a PI system in managed system configuration. I register the  Netweaver PI AS ABAP technical system to solman's SLD directly(run RZ70), and collect the information of the Netweaver PI AS JAVA fro

  • ProtectLink Web Protect URL Filtering not working

    Good day! Please help. We have a problem on our RV042 router. The Protectlink WebProtect URL filtering is not working. When we first activate the service (Nov. 12), it worked for a few days, then 2 days ago, our internet connection got problems. But