TPS Directory Parse for remote files

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf TPS Directory Parse for remote files

  • Creator
    Topic
  • #52594
    Michael Lacriola
    Participant

      Has anyone ever configured a TPS directory parse for files on a remote system? For example, I often use a tps proc that grabs files of a certain extension local to my unix system and then adds them to the outbound list. This works great for fileset-local protocols.

      If my protocol is Fileset-FTP, which connects to a remote unix system and reads files from that directory, how can I grab a list of those files to validate the extension? Do I need to use the “ls” command within the tps directory parse to grab the file names? For local files I use the glob command to get the list of potentials and do some other checking on the file before adding it to the list to be returned.

      Any ideas would be appreciated. I’ll keep digging.

    Viewing 0 reply threads
    • Author
      Replies
      • #74799
        Michael Lacriola
        Participant

          Why do I bother posting…I found the answer to my problem. You can simply add the file extension in the FTP options under the Dir List Command of the fileset-FTP protocol. Been a long time since I messed around with this aspect.

          The default is simply nlst (which for the life of me do not understand how it works since the nlst command is not a valid command for FTP in Unix, nlist is correct). See the sample output once FTP has been established to remote system below. There’s probably some sort of alias or something within Cloverleaf. Who knows…

          ftp> cd partial

          250 CWD command successful.

          ftp>

          ftp> nlst

          ?Invalid command

          ftp> nlist

          200 PORT command successful.

          150 Opening data connection for /bin/ls.

          total 32

          -rwxr-xr-x    1 lacriola cachegrp        651 Jul 16 08:57 PV-BLD-399.xml

          -rwxr-xr-x    1 lacriola cachegrp        649 Jul 16 08:57 PV-BLD-400.xml

          -rwxr-xr-x    1 lacriola cachegrp        651 Jul 16 08:57 PV-BLD-402.xml

          -rwxr-xr-x    1 lacriola cachegrp        663 Jul 16 08:57 V-BLD-401.xml

          drwxrwxrwx    2 lacriola cachegrp        256 Jul 15 15:56 save

          226 Transfer complete.

          ftp> nlist *xml

          200 PORT command successful.

          150 Opening data connection for /bin/ls.

          -rwxr-xr-x    1 lacriola cachegrp        651 Jul 16 08:57 PV-BLD-399.xml

          -rwxr-xr-x    1 lacriola cachegrp        649 Jul 16 08:57 PV-BLD-400.xml

          -rwxr-xr-x    1 lacriola cachegrp        651 Jul 16 08:57 PV-BLD-402.xml

          -rwxr-xr-x    1 lacriola cachegrp        663 Jul 16 08:57 V-BLD-401.xml

          226 Transfer complete.

          By changing the default of nlst to nlst *xml, this solves the error in the protocol when it encounters a directory as part of the nlst return. I’m sure there’s other flags that could be used with nlst, but I’m happy with my current results. Moving forward…

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.