bvstone

Copying Files from the IBM i Integrated File System (IFS) to your PC

Posted:

Copying Files from the IBM i Integrated File System (IFS) to your PC

Often when offering support for customers (or even non-customers) part of the debugging process may involve copying trace and/or debug files from the IFS on the IBM i to your PC in order to be emailed to a support contact.  

Surprisingly, this is often something that the end user needs help with.  So, here are a couple of the methods I use:

FTP - File Transfer Protocol

Yes, good old FTP will do the job just fine!  The only real thing to remember is if you are transferring binary files (such as images, PDF, or anything that's not really plain text) is to make sure to use binary mode.

If you want to use the standard Microsoft FTP client (which works just fine), here is all you need to do:

  • Make sure the FTP server is running on your IBM.  You can do this using the command:
    WRKACTJOB JOB(QTFTP*)

    This should list the active FTP jobs.  If you don't see them, contact your IBM i admin (if needed) to see if you can fire it up using the following command:
    STRTCPSVR SERVER(*FTP)
     
  • Press the Windows key and R to open a command prompt.
  • Type "ftp" in the command prompt that is opened.  This will open a DOS prompt and start the Microsoft Windows FTP client.

The following example is using FTP to download a file named test.json from the /tmp directory to my PC into a directory named c:\temp.  (I always create a temp directory on my PCs so I know I can always download things to this place with an easy to remember name).  The text in red is what you will type.  Of course replace the IP address, user id and password with those values for your system.

ftp> open 192.168.1.xx
Connected to 192.168.1.xx.
220-QTCP at devo.bvstools.com.
220 Connection will close if idle more than 5 minutes.
501 OPTS unsuccessful; specified subcommand not recognized.
User (192.168.1.xx:(none)): yourid
331 Enter password.
Password: yourpassword
230 BVSTONE logged on.
ftp> quote site namefmt 1
250  Now using naming format "1".
ftp> cd /tmp
250 "/tmp" is current directory.
ftp> lcd c:\temp
Local directory now C:\temp.
ftp> get test.json
200 PORT subcommand request successful.
150 Retrieving file /tmp/test.json
226 File transfer completed successfully.
ftp: 315 bytes received in 0.01Seconds 63.00Kbytes/sec.
ftp> quit


The only thing you may need to change is if you are downloading a binary type file be sure to issue the bin command before the get command.   If you need to switch back to text mode to download text files just issue the ascii command.  Super simple!

And don't forget you can use wild cards with FTP.  If you wanted to download all files that start with "mailtool" you could use:

mget mailtool*

Or if you wanted to download all files with an extension of .json you could use:

mget *.json

FTP is still quite a viable option for those that aren't familiar with other options that follow.

Windows Explorer and IBM i NetServer

NetServer, I think, is one of the most underused options on the IBM i system these days.  Setting it up isn't that hard, and once it is it makes copying files from the IFS on your IBM i to your PC as easy as transferring files from a network drive to your PC, or even from directory to directory on your PC.

Here is a great article on Configuring NetServer on your IBM i (from IBM!  I have to say their documentation is getting a lot better!)

Once that is set up you simply need to set up shares for directories on the IFS and they should show up in your Windows Explorer window under Network.

I will add more options when I have time, but these two I feel are the most simple and easy to use (especially FTP!)

 




Latest Posts:

GreenTools for Google Apps (G4G) v15.00 Now Offers Functions to Bypass Registration Command and BVSTools Landing Page GreenTools for Google Apps (G4G) v15.00 Now Offers Functions to Bypass Registration Command and BVSTools Landing Page
Posted by May 3, 2022
BVSTools >> BVSTools Announcements >> GreenTools for G Suite (Google Apps) (G4G) Specific Announcements
How Do I Switch From MAILTOOL Plus to GreenTools for Google or Microsoft Office 365? How Do I Switch From MAILTOOL Plus to GreenTools for Google or Microsoft Office 365?
Posted by April 18, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
PTFs Issued for SSL/TLS Issues PTFs Issued for SSL/TLS Issues
Posted by March 12, 2022
IBM Power Systems >> PTF Watch
Google Dropping Support for Google Dropping Support for "Less Secure Apps" May 30th, 2022. What Does This Mean for Your IBM i Email?
Posted by March 4, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
Have You Installed a New Version of MAILTOOL and Now Things Are Acting Different?  Check the Command Defaults! Have You Installed a New Version of MAILTOOL and Now Things Are Acting Different? Check the Command Defaults!
Posted by February 28, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
Using MAILTOOL Plus on V7R1, or Any OS Using TLS 1.1 or Older Using MAILTOOL Plus on V7R1, or Any OS Using TLS 1.1 or Older
Posted by January 27, 2022
BVSTools >> BVSTools Software Discussion >> Email Tools (MAILTOOL) Specific Discussion
BVSTools ILE Functions Being Updated to Remove Hashtag (#) from Function Names BVSTools ILE Functions Being Updated to Remove Hashtag (#) from Function Names
Posted by December 30, 2021
BVSTools >> BVSTools Announcements
GETURI v12.00 Released Removing Beginning # (Hashtag) From Function Names GETURI v12.00 Released Removing Beginning # (Hashtag) From Function Names
Posted by December 28, 2021
BVSTools >> BVSTools Announcements >> Get URI (GETURI) Specific Announcements
Is any of BVSTools Software Affected by the log4j exploit? Is any of BVSTools Software Affected by the log4j exploit?
Posted by December 20, 2021
BVSTools >> BVSTools Software Discussion
GreenTools for Microsoft Apps (G4MS) Updated to Allow Downloads, Deletes, and Sharing of Files GreenTools for Microsoft Apps (G4MS) Updated to Allow Downloads, Deletes, and Sharing of Files
Posted by December 17, 2021
BVSTools >> BVSTools Announcements >> GreenTools for Microsoft Apps (G4MS) Specific Announcements
SSL Handshake Errors with GETURI, MAILTOOL and GreenTools Products SSL Handshake Errors with GETURI, MAILTOOL and GreenTools Products
Posted by October 18, 2021
BVSTools >> BVSTools Software Discussion
MAILTOOL Updated to Retry Sending when GSK SSL Handshake Error 415 (GSK_ERROR_BAD_PEER) is Encountered MAILTOOL Updated to Retry Sending when GSK SSL Handshake Error 415 (GSK_ERROR_BAD_PEER) is Encountered
Posted by August 19, 2021
BVSTools >> BVSTools Announcements >> eMail Tool (MAILTOOL) Specific Announcements
MAILTOOL Updated to Allow List-Unsubscribe and User Defined Headers MAILTOOL Updated to Allow List-Unsubscribe and User Defined Headers
Posted by August 13, 2021
BVSTools >> BVSTools Announcements >> eMail Tool (MAILTOOL) Specific Announcements
AWS signing process in as400 AWS signing process in as400
Posted by August 13, 2021
Programming >> Web Programming
2022 License Price Increase and Consulting Update for Non-Software Specific Assistance 2022 License Price Increase and Consulting Update for Non-Software Specific Assistance
Posted by August 9, 2021
BVSTools >> BVSTools Announcements

Reply




Copyright 1983-2020 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, CKEditor and running on the IBM i (AKA AS/400, iSeries, System i).