Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    3
    Rep Power
    0

    Default How to get Home directory using Common Net ftp api?

    Hi Friends,

    I am using Common Net FTP api to transfer file to my ftp server.
    Firt i login into the ftp server & the default directory is user home directory.
    The problem i am facing is if i do
    ftp.changeWorkingDirectory(str); once , i am there in the new directory but now i again want to some other directory
    sy: i first login into my home directory which is default:

    aggarwal>

    now i do

    ftp.changeWorkingDirectory("V4");

    now dir is : aggarwal/V4>

    No i want to go in aggarwal/V5 but i cant do until i go to home directory and then do ftp.changeWorkingDirectory("V5");

    Can any 1 please tell me if there is any way we can get the default home directory when we connect to ftp server.
    I also tried ftp.changeWorkingDirectory(""); but this doesnt take us to home directory though just doing cd takes us to home dir in unix.

    Please help me guys.

    Thanks

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    In FTP, the home directory is designated as "/", the root directory. Just cd("/V4") and cd("/V5"), which specifies fully qualified folder names.

Similar Threads

  1. ow to get Home directory using Common Net ftp api?
    By cprash.aggarwal in forum Advanced Java
    Replies: 1
    Last Post: 03-01-2009, 05:57 PM
  2. Make money from home, Home Typing Data Entry Partnerships
    By arturmoniswork in forum Reviews / Advertising
    Replies: 0
    Last Post: 12-30-2008, 05:55 AM
  3. Common error page using struts tiles...?
    By prabhurangan in forum Web Frameworks
    Replies: 0
    Last Post: 08-28-2008, 02:34 PM
  4. Joining two 2D Arrays over a common column
    By Sknight126 in forum Advanced Java
    Replies: 0
    Last Post: 11-02-2007, 11:29 AM
  5. Where i have to write the common data to jsp
    By trill in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-07-2007, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •