ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Copy .txt file from IFS to Windows

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

  • Copy .txt file from IFS to Windows

    Hello all,

    for anyone who cares to answer, I am wanting to copy a text file from a directory in our IFS to another directory on our network. I'm not sure how to go about this and as this is a bit of an amateurish question I would appreciate general answers pointing me in the right direction rather than just out right answering.

    What I've tried so far is

    1. Powershell - though not very well. I was able to make a connection to our i, I wasn't exactly able to figure out how to do a simple copy. I know I can use the .OdbcCommand to send SQL commands, but I don't think that is what will work best for me.

    2. Powershell - again using NETSTAT or Set-Location has worked somewhat, but when attempting to list the directory to prove I actually could work with the files I received an error.

    3. Powershell - Using the command-line interaction with ACS seems like a good way but when using rmtcmd it asks for credentials and I'd like to automate this process without the need for credentials, though I'm fairly sure I will need them. Also, the command-line interaction has IFS capabilities, but according to the 'GettingStarted' documentation, "The Integrated File System Support uses the QFileSvr.400 file system to copy or send objects from one IBM i partition to another."

    Again, general guidance or best practices are appreciated.

  • #2
    If this is a one-time thing, just download it using ACS and copy it over.

    Comment


    • #3
      Originally posted by jtaylor___ View Post
      If this is a one-time thing, just download it using ACS and copy it over.
      Unfortunately this is not a one time thing. This is my first attempt at automating data retrieval from a spooled file, writing it to a text file, then pushing that into our network at large. The first part I've got figured out. Now I'm working on moving that text file into our network.

      I have made some progress working in powershell, but I'm coming up with something peculiar.

      The directory in the IFS I'm attempting to connect to is shared out to the public. I can use New-PSDrive with QSECOFR credentials and connect fine. However, I will not be using QSECOFR to connect, obviously. We use another credential to connect to a shared drive in the IFS on another server, but in working with it on my own PC I get access denied. My personal credentials return access denied as well... so I'm a bit confused.

      Comment


      • rynspate
        rynspate commented
        Editing a comment
        Obviously something simple... the user names were disabled for the i5/net server...

    • #4
      spoke too soon... I enabled the disabled users and still hitting the same issue...

      Comment


      • #5
        I've added my personal user account with read/write/execute permissions on the particular directory and I'm still getting an access denied error...

        Still a bit confused on this one.

        Comment


        • #6
          Are you logging into the correct domain? What is the password level of the IBM i you're trying to connect to?

          Comment


          • rynspate
            rynspate commented
            Editing a comment
            These are accounts on the i, so they conform to the password level. Also, when I sign in with QSECOFR I don't specify the domain, it just accepts the credentials. I have tried my personal account with the domain appended and without and I'm still not able to log in.
            Last edited by rynspate; November 26, 2021, 09:50 AM. Reason: Adding further clarification.

        • #7
          You can use FTP to transfer it from the IFS to the windows server.

          Scott Klements FTP API makes it very easy to implement.

          Comment

          Working...
          X