How to download a directory into local machine from FTP using java

Hi,
I want to download a directory from FTP. How can i achieve this.
Regards,
Ahamad

Achieve what? How about thinking about what you really have to do in detail? That way you might find out how it'll work and what to implement.
By the way, there are many Java FTP libraries (e.g. NetComponents.jar) available. Google will find them, and you can use them to do at least the accessing part of your program.

Similar Messages

  • How to download Bex patch into local computer

    I'm going to upgrade Business explorer to the lastes version. I find the last version is "xBEXSP13_1300-20003075.cab" in the SAP sevice market.
    I already added it into download basket. Could anyone tell me how to download it into our local PC.
    Thanks,
    rajatina

    is the download manager installed in you local PC or desktop.
    First install the download manager in your system and them you can download the latest BEx patch to your system.

  • Download WDJ application into local file from portal

    hi all,
    i have to download one WDJ application which is running in portal, and modifiy the same.
    how to do that,
    Thanks
    Bala

    Hi,
    Go through the following links
    [How to get source code from portal app]
    [Restore source code from ear file;
    [http://help.sap.com/saphelp_nw2004s/helpdata/en/9c/8a9383a2aeda4a962446d3c29b9e19/frameset.htm]
    Regards
    Raghu

  • How to access a file in Unix server from windows using java

    I want to access a file in unix server from windows using java program.
    I have the following code. I am able to open the url in a web browser.
    String urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    URL url = new URL(urlStr);
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream)));
    String inputLine;
    while((inputLine=in.readLine()))!=null){
    System.out.println(inputLine);
    in.close();
    I get the following error
    java.io.FileNotFoundException: /javatest/test.csv
    at sun.net.www.protocol.ftp.FtpURLConnection.getInputStream(FtpURLConnection.java:333)
    at java.net.URL.openStream(URL.java:960)
    at com.test.samples.Test.main(Test.java:45)

    urlStr="ftp:user:passwd@unix-server:ftp-port//javatest/test.csv;type=i";
    I have given the format of the urlStr that I am using in the code. The actiual values are used in my code. I have tried pasting this url in the browser and it opens the file.

  • How do you get values of local machine running applet on remote server?

    Hi,
    I have an applet that runs great running the html file on my local machine from a root directory. I've placed my code(java, class, and html files) on the web server and loaded the applet onto a page. The results are merely:
    "Computer Name: localhost"
    "IP Address : 127.0.0.1"
    Instead of:
    "Computer Name: ACTUALNAME"
    "IP Address : 189.40.20.211"
    etc...
    The code is as follows:
    import java.applet.*;
    import java.awt.*;
    import java.net.InetAddress;
    public class IPFinder extends Applet {
    public void paint(Graphics g) {
    super.paint(g);
    try {
    InetAddress localaddr = InetAddress.getLocalHost () ;
    g.drawString("Computer Name: " + localaddr.getHostName (), 2, 13);
    g.drawString("IP Address : "+localaddr.getHostAddress (), 3, 25);
    g.drawString("", 3, 45);
    String str = localaddr.getHostName();
    InetAddress[] localaddrs = InetAddress.getAllByName ( str ) ;
    for ( int i=0 ; i<localaddrs.length ; i++ )
    if ( ! localaddrs[ i ].equals( localaddr ) )
    // g.drawString("Local hostname : " + localaddrs[ i].getHostName () , 3, (i+0)+50);
    g.drawString("Local IP Address("+i+"): " + localaddrs[ i].getHostAddress () , 3, (12*i)+((i+10)+45));
         }} } catch (Exception e) {
    g.drawString("Can't detect localhost : " + e +". Check Network settings.", 3, 60);
    public static void main(String[] args) { new IPFinder(); }
    I'm trying to get Real IP Addresses (as the code was setup to do) from a browser running on the web server. I have read some of the threads in this forum and some mention to use NetworkInterface while others recommended using Sockets (not an option since we do not use them), and another to use a signature as a workaround. Anyone know the best direction to get the results expected?
    Thanks in advance,
    Geoff-

    I have an applet that runs great running the html file
    on my local machine from a root directory. I've
    placed my code(java, class, and html files) on the web
    server and loaded the applet onto a page. The results
    are merely:
    "Computer Name: localhost"
    "IP Address : 127.0.0.1"This indicates that your applet when run over a web
    server has not the rights to query the local name and
    address. Look [url
    http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAd
    ress.html#getLocalHost()]here. The so-called
    loopback address is 127.0.0.1
    Check your documentation for "signed jar" (or search
    the forum or the sun website) if you want to give your
    applet more rights, but I don't think that this is
    worth the effort in this case.
    gdsimz, since you already started two new threads based on my suggestion, how about at least saying "thank you" or "sorry, didn't help"?

  • How to find IP address of local machine

    I need to find the IP address of the local machine. I used the following code:
    import java.net.*;
    class test7
    public static void main(String args[])throws Exception
    InetAddress add=InetAddress.getLocalHost();
    System.out.println(add);
    }The output is:
    home/117.254.104.194
    But i need only the IP address without the name of my local machine. How to acheive it? I also need to convert IP address into either String, Byte, Double, Float or Int. Thanks in advance.

    If only there were something in the API docs in this direction!
    public byte[] getAddress()
        Returns the raw IP address of this InetAddress object.
    The result is in network byte order: the highest order byte of the address is in getAddress()[0].
    */

  • HT203433 I purchased an audible book from iTunes and don't know how to download the book into iTunes on my computer

    I purchased an audible book from iTunes and do not know how to download the book into iTunes on my computer

    audible supports their content, including importing to itunes:
    http://audible.custhelp.com/app/answers/detail/a_id/3130/~/how-to-import-audible -content-to-itunes-(pc)

  • Download Text file to Local drive from BSP Application

    Hi Guys,
    I am new to BSP, and I am doing a BSP application in which i want to download a text file to local drive C: on click of button. For that I am having a data in Internal table and Onclick event, in model class method DO_HANDLE_EVENT i want to download text file to local machine drive.
    Can anybody provide me full code with all data declaration and all?
    Your help would be appriciable. Thanks in Advance.

    Hi Jessy ,
    You can download the file from BSP pages using the method
    CL_BSP_UTILITY=>download.
    Please follow the below mentioned steps.
    1.Convert the text to a text table ie Internal table with a line type char255 or some others.
    2.Convert the text table into a string.
    3.Convert the string to XSTRING.
    4.Download that XSTRING as text file using the method
       CL_BSP_UTILITY=>download.
    Parameters:
    OBJECT_S    - XSTRING data
    CONTENT_TYPE  =  ' application/download'
    CONTENT_DISPOSITION = 'attachment; file=test.txt'
    RESPONSE                   = runtime->server->response
    NAVIGATION                   = navigation
    OBJECT_T
    I dont have system to give a programatical explanation to u.
    If you have any doubt kindly post.
    Reward for every useful solutions..
    Best Regards
    Renga

  • Can anyone advise me how to insert a hyperlink into a project I am using Captivate 5?

    Can anyone advise me how to insert a hyperlink into a project - I am using Captivate 5

    You can use an interactive object such as a click box placed over the top of a text caption, or a button, to link to the URL.  However, these will not strictly-speaking appear identical to hyperlinks.
    If you really want to replicate the rollover appearance of a true HTML text hyperlink, then you might consider the Hyperlink widget from Infosemantics:
    http://www.infosemantics.com.au/adobe-captivate-widgets/hyperlink-interactive/help
    Free trial versions for download hers:
    http://www.infosemantics.com.au/adobe-captivate-widgets/download-free-trial-widgets

  • How to store xml data into file in xml format through java program?

    HI Friends,
    Please let me know
    How to store xml data into file in xml format through java program?
    thanks......
    can discuss further at messenger.....
    Avanish Kumar Singh
    Software Engineer,
    Samsung India Development Center,
    Bangalore--560001.
    [email protected]

    Hi i need to write the data from an XML file to a Microsoft SQL SErver database!
    i got a piece of code from the net which allows me to parse th file:
    import java.io.IOException;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import org.apache.xerces.parsers.SAXParser;
    import java.lang.*;
    public class MySaxParser extends DefaultHandler
    private static int INDENT = 4;
    private static String attList = "";
    public static void main(String[] argv)
    if (argv.length != 1)
    System.out.println("Usage: java MySaxParser [URI]");
    System.exit(0);
    String uri = argv[0];
    try
    XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    MySaxParser MySaxParserInstance = new MySaxParser();
    parser.setContentHandler(MySaxParserInstance);
    parser.parse(uri);
    catch(IOException ioe)
    ioe.printStackTrace();
    catch(SAXException saxe)
    saxe.printStackTrace();
    private int idx = 0;
    public void characters(char[] ch, int start, int length)
    throws SAXException
    String s = new String(ch, start, length);
    if (ch[0] == '\n')
    return;
    System.out.println(getIndent() + " Value: " + s);
    public void endDocument() throws SAXException
    idx -= INDENT;
    public void endElement(String uri, String localName, String qName) throws SAXException
    if (!attList.equals(""))
    System.out.println(getIndent() + " Attributes: " + attList);
    attList = "";
    System.out.println(getIndent() + "end document");
    idx -= INDENT;
    public void startDocument() throws SAXException
    idx += INDENT;
    public void startElement(String uri,
    String localName,
    String qName,
    Attributes attributes) throws SAXException
    idx += INDENT;
    System.out.println('\n' + getIndent() + "start element: " + localName);
    if (localName.compareTo("Machine") == 0)
    System.out.println("YES");
    if (attributes.getLength() > 0)
    idx += INDENT;
    for (int i = 0; i < attributes.getLength(); i++)
    attList = attList + attributes.getLocalName(i) + " = " + attributes.getValue(i);
    if (i < (attributes.getLength() - 1))
    attList = attList + ", ";
    idx-= INDENT;
    private String getIndent()
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < idx; i++)
    sb.append(" ");
    return sb.toString();
    }// END PRGM
    Now , am not a very good Java DEv. and i need to find a soln. to this prob within 1 week.
    The next step is to write the data to the DB.
    Am sending an example of my file:
    <Start>
    <Machine>
    <Hostname> IPCServer </Hostname>
    <HostID> 80c04499 </HostID>
    <MachineType> sun4u [ID 466748 kern.info] Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 360MHz) </MachineType>
    <CPU> UltraSPARC-IIi at 360 MHz </CPU>
    <Memory> RAM : 512 MB </Memory>
    <HostAdapter>
    <HA> kern.info] </HA>
    </HostAdapter>
    <Harddisks>
    <HD>
    <HD1> c0t0d0 ctrl kern.info] target 0 lun 0 </HD1>
    <HD2> ST38420A 8.2 GB </HD2>
    </HD>
    </Harddisks>
    <GraphicCard> m64B : PCI PGX 8-bit +Accel. </GraphicCard>
    <NetworkType> hme0 : Fast-Ethernet </NetworkType>
    <EthernetAddress> 09:00:30:C1:34:90 </EthernetAddress>
    <IPAddress> 149.51.23.140 </IPAddress>
    </Machine>
    </Start>
    Note that i can have more than 1 machines (meaning that i have to loop thru the file to be able to write to the DB)
    Cal u tellme what to do!
    Even better- do u have a piece of code that will help me understand and implement the database writing portion?
    I badly need help here.
    THANX

  • How do I move data on time machine from one external hard drive to another

    How do I move data on time machine from one external hard drive to another?

    Although the documentation says you can copy Time Machine backups in the Finder, it's very slow and sometimes doesn't work at all.
    Launch Disk Utility, open the built-in help, and search for the term "Duplicate." Follow the instructions. Turn Time Machine OFF in its preference pane while copying the volume.

  • I update my IPhone4 to IOS6 from IOS4.3.3. My all songs are missing in the Iphone4. How to get those songs into my Iphone from ITunes. Even after sync also not coming to IPhone.

    I update my IPhone4 to IOS6 from IOS4.3.3. My all songs are missing in the Iphone4. How to get those songs into my Iphone from ITunes. Even after sync also not coming to IPhone.

    The iphone is not  storage/backup device.
    The sync is one way - computer to iphone.
    The only exception is itunes purchases.  File>Devices>Transfer Purchases
    You should copy everything from your old computer, or your backup copy of your old computer, to your new one.

  • How to download 'all photos at a time' from shared stream?

    I have a photo stream shared album (with 120 pictures) on icloud.  This is shared from iPhone.  I opened the link on my mac/windows in the browser.  Now, how to download 'all photos at a time' from shared stream?  I don't want to download each photo at a time.  There are 100s of photos to download.  I can't open one photo at a time and keep downloading them separately.  There should be a way to download all photos from a shared stream.  Please let me know how you are dealing with this?

    1.you need create a dba user in your database
    2.you can run the script as command
    eg. use PL/sql developer ->new command window->open script-> run.

  • How to download the custom Tables to xls from the system?

    Hi
    How to download the custom Tables to xls from the system?
    Vijay

    Hi,
    Goto SE11, in the table name field give Z*, and click on display. You will get the list of Z tables.
    Regards,
    Prabu

  • How to download the custom Reports to xls from the system?

    Hi
    How to download the custom Reports to xls from the system?
    I know the t code SE38 for reports.
    Vijay

    Hi
    Here the programa name is nothing but a report name???
    Vijay

Maybe you are looking for

  • How to move mobile applications, artwork, games folders?

    Hi, I added an external harddrive to my PC today due to my music harddrive (drive J:) running out of space. I moved/consolidated my music/media to the new external harddrive (drive E:) per instructions here: http://support.apple.com/kb/HT1364?viewloc

  • Filter value for variable selection screen

    Hi & help !, This could be a tricky or an easy question, but it seems too hard for me ! I'm storing version in my cube, and have a report which shows informations for the version you select (with a variable = ZVERSION01). ex :  Version : V01 V02 V03

  • Touch-pad "click" not working after waking-up from

    Hi, I hope the subject is kind of a give away. Basically, I've finally gotten around to sorting out ACPI for my Dell 9600 laptop. I've configured, via KLaptop, for the machine to go into Standby when I close the lid. This works ok except that when I

  • How can I purge screen names stored in the browser?

    When I go to a website and start to type my screen name, all the screen names I have used starting with that letter are suggested in a drop-down box. How can I get rid of these? Sometimes they were typed in error, sometimes they are out of date. I'd

  • Need a report that display number of SR without Activities

    If I want to show number of SR without activity, is there any good solution? my solution: Report 1: Service Request History Owner, service number put advanced filter : that service number is not equal to any SR in Report2 Report 2:Activity History Se