sponsored links

Collapse

Announcement

Collapse
No announcement yet.

Noob Question: FTP, using "LCD" command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Noob Question: FTP, using "LCD" command

    Good afternoon,

    I am embarrassed to ask such a basic question, so here goes!

    I am using FTP command on IBM i. I have a directory called "test" on IFS sitting in root directory.

    If I use wrklnk, I can find it here like this:
    Directory . . . . : /./test

    When I go to use FTP, and try using different ways to change local directory like "LCD /./test", LCD '/./', or LCD 'test', I get only get this message back:
    File name format not valid. Use the format: library/file.member or file.member.

    How do I change the local directory properly if my directory's sitting in root? Or what would be the correct full path to my folder in other words? I appreciate the help!

  • #2
    Re: Noob Question: FTP, using "LCD" command

    Right after logging on do a NAMEFMT 1

    The default is NAMEFMT 0 - which is IBM i library convention - format 1 is the IFS naming convention.

    Comment


    • #3
      Re: Noob Question: FTP, using "LCD" command

      Originally posted by Rocky View Post
      Right after logging on do a NAMEFMT 1

      The default is NAMEFMT 0 - which is IBM i library convention - format 1 is the IFS naming convention.
      BINGO!

      That was it.

      I was using the command "quote site namefmt 1" on the source machine, while on source I was trying LCD command after that. Now it works perfect!

      After using "namefmt 1" now, along with setting to BIN, I'm able to use "LCD /./test/" or "LCD /test/" without error. Verified that I was able to transfer over files perfectly. Thank you!!

      Comment


      • #4
        Re: Noob Question: FTP, using "LCD" command

        Originally posted by LiQuiD_FuSioN View Post
        I was using the command "quote site namefmt 1" on the source machine, while on source I was trying LCD command after that. Now it works perfect!
        "Quote Site" will run the command on the remote system only. Omitting that will run the command on both systems

        After using "namefmt 1" now, along with setting to BIN, I'm able to use "LCD /./test/" or "LCD /test/" without error. Verified that I was able to transfer over files perfectly. Thank you!!
        I keep wondering why you are trying "/./test". As you are starting with a "/", you are specifying an absolute path. "/test" is the directory test off the root directory. Adding "/." in front adds no value (root directory, current directory off that (which is the root), then the test dir off that)...

        Comment


        • #5
          Re: Noob Question: FTP, using "LCD" command

          Originally posted by john.sev99 View Post
          "Quote Site" will run the command on the remote system only. Omitting that will run the command on both systems


          I keep wondering why you are trying "/./test". As you are starting with a "/", you are specifying an absolute path. "/test" is the directory test off the root directory. Adding "/." in front adds no value (root directory, current directory off that (which is the root), then the test dir off that)...
          I was confusing myself more than anything.

          What set it off was probably using wrklnk '/./' and seeing the path at the top that literally shows "/./test" anyway further confusing me. I appreciate the help.

          Comment


          • #6
            Re: Noob Question: FTP, using "LCD" command

            Just in case...

            If your purpose for using FTP is to simply transfer one or more database tables from one IBM i to another, it is much easier, and typically faster, to use 3 part naming SQL to perform that transfer, especially if the two IBM i systems are on the same local LAN. If the transfer is occurring over a WAN, then compressing the data and FTP'ing it is likely worth the extra effort.

            I sent that tip to a very large IBM i shop and they adopted it almost immediately instead of using FTP, once they saw how much easier it was.

            Mike

            Comment

            Working...
            X