ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

FTP all files in PC Directory to IFS

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

  • FTP all files in PC Directory to IFS

    Ftp an entire PC folder to the IFS

    Create the directory on the IFS (under ROOT/Home)
    Give everyone access (*RWX)

    Code:
    MD DIR('/home/upload') DTAAUT(*RWX) OBJAUT(*ALL)
    Find you folder on your PC to "upload"
    I selected C:\Documents and Settings\jamie\Favorites

    Then click on start

    From the pop up select Run...

    Then you get your Run window....

    Type cmd (this is XP by the way)

    Now you get your DOS comman window

    type:

    FTP 192.168.1.1
    The window will return that you are connected to your Iseries
    and prompt you for your userid.

    Type it in hit <ENTER>
    then enter your password (hit <ENTER>)

    If you did a DIR now in the DOS window you would
    get a listing of all the "stuff" in QGPL
    but we want our home directory to be on the IFS.

    To do this we must change our name format to 1

    Code:
    quote site namefmt 1
    get message back saying using name format 1

    Code:
    cd "/home/upload"
    Then change local directory (the PC directory where your upload data is stored)

    Code:
    lcd C:\Documents and Settings\jamie\Favorites
    then type (get message interactive mode off)
    Code:
    prompt
    lastly put all the files in PC directory C:\Documents and Settings\jamie\Favorites
    to IFS folder /home/upload

    Code:
    mput *.*

    Thats it......
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    Re: FTP all files in PC Directory to IFS

    Hi there!

    I tried to follow this example but I got the error 501 Unknown extension in database file name... I tried to ftp a single file called hello.java...

    Thnx in advance

    Comment


    • #3
      Re: FTP all files in PC Directory to IFS

      You would get an error like that if you were going to QDLS instead
      of ROOT... The rules for QDLS are very strict.

      Please post the file and I will test from here.

      thanks
      Jamie
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: FTP all files in PC Directory to IFS

        oh yes! my bad..
        it´s working now

        Thanx!!

        Comment


        • #5
          Re: FTP all files in PC Directory to IFS

          C:\Documents and Settings\MIKEY.WORKGROUP>ftp 192.0.0.100
          Connected to 192.0.0.100.
          220-QTCP at CENTURY.CENTURYCABINETRY.COM.
          220 Connection will close if idle more than 5 minutes.
          User (192.0.0.100none)): mikey
          331 Enter password.
          Password:
          230 MIKEY logged on.
          ftp> quote site namefmt 1
          250 Now using naming format "1".
          ftp> cd "/home/upload"
          550-Specified directory does not exist or cannot be accessed.

          I get that far. Do I have to create a directory manually on IFS?
          Thanks

          Comment


          • #6
            Re: FTP all files in PC Directory to IFS

            Originally posted by mikeyank View Post
            Do I have to create a directory manually on IFS?
            Thanks
            Yes of course.. !!

            Comment


            • #7
              Re: FTP all files in PC Directory to IFS

              ftp>User MikeY
              ftp><password>
              ftp>quote site namefmt 1
              ftp>md /home/upload
              ftp>cd /home/upload
              ftp>put <myfile> <tofile>
              ftp>quit


              Note: the MD /home/upload command will error if the directory already exists .. so, this just makes sure it's available before you execute your PUT command.

              Comment


              • #8
                Re: FTP all files in PC Directory to IFS

                Create it manually or type
                Code:
                quote  "MKD /home/upload"
                using FTP
                Philippe

                Comment

                Working...
                X