ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

FTP Dynamically delete received file

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

  • FTP Dynamically delete received file

    Hi, I want to Dynamically delete files on a remote system. The file names will allways be different and there can be any number of them.

    I know to do this so far in my FTP script.

    PHP Code:
    ls (disk 
    I now have the file;

    PHP Code:
    Member . . . . . :   LSOUTPUT 
    Control  
    . . . . .            
    Find . . . . . . .            
    *...+...
    .1....+....2....+....3
    20080131135910                
    20080131164710                
    20080131165220 
    But how do I in my FTP scrip delete these files? Of course I will be doing an MGET * before hand.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

  • #2
    Re: FTP Dynamically delete received file

    Ug, I just came across MDelete *. That will work. I knew that if i posted I would stumble across the answer.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: FTP Dynamically delete received file

      Gotta love it when people answer their own questions ...

      Comment


      • #4
        Re: FTP Dynamically delete received file

        Originally posted by DeadManWalks View Post
        Hi, I want to Dynamically delete files on a remote system. The file names will allways be different and there can be any number of them.

        But how do I in my FTP scrip delete these files? Of course I will be doing an MGET * before hand.
        Of course if you had wanted to deleted any number of "selected" files which may not be 100% of those MGOT, then you could just use an RPG pgm to create and write to an FTP instruction set file (text flat file) then override to that as the FTP (input) file for the FTP command.

        In case you download all files (MGET *) then process them, and then delete only the files that have processed successfully, thereby leaving any "problem" files for investigation.

        GC
        Greg Craill: "Life's hard - Get a helmet !!"

        Comment


        • #5
          Re: FTP Dynamically delete received file

          Thanks for the reply. This is a good way to go. I'll add this.
          Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

          Comment

          Working...
          X