Putting or Getting multiple files with RxFtp 
Author Message
 Putting or Getting multiple files with RxFtp

I'm brand new to Rexx.  I just started writing some scripts using RxFtp
and noticed that the Put and Get functions don't accept wildcards.
What's the best way to do it?  DOS batch files have a FOR command; does
Rexx have something similar?


Sun, 18 Mar 2001 03:00:00 GMT  
 Putting or Getting multiple files with RxFtp

 DS> the Put and Get functions don't accept wildcards.
 DS> What's the best way to do it?

Maybe that's using a "stem", AKA "compound variable". See below...

 DS> DOS batch files have a FOR command; does Rexx have
 DS> something similar?

Yes : "DO". Here's an example (not tested, pseudo-code, etc.) :

   /* Send all files on drive A: with RxFtpPut to someone */
   CALL RxFuncAdd 'SysFileTree','RexxUtil','SysFileTree'
   CALL SysFileTree 'A:\*','file','FOS'
   IF file.0=0 THEN DO
      SAY 'No files found on drive A:'
      EXIT
   END
   DO i=1 TO file.0
      SAY 'Sending file' i 'of' file.0 ':' FileSpec('Name',file.i)
      /* CALL RxFtpPut 'ftp://dont.know.the.syntax.of.RxFtpPut',file.i */
   END i
   SAY file.0 'file(s) sended.'
   EXIT



Sun, 18 Mar 2001 03:00:00 GMT  
 Putting or Getting multiple files with RxFtp

Quote:

>I'm brand new to Rexx.  I just started writing some scripts using RxFtp
>and noticed that the Put and Get functions don't accept wildcards.
>What's the best way to do it?  DOS batch files have a FOR command; does
>Rexx have something similar?

Yup. Try: do i = 1 to x
          /* some work */
          end

--

/--------------------\
| Jerry McBride      |

\--------------------/



Sun, 18 Mar 2001 03:00:00 GMT  
 Putting or Getting multiple files with RxFtp
On Wed, 30 Sep 1998 08:04:19, Desmond Silveira

Quote:

> I'm brand new to Rexx.  I just started writing some scripts using RxFtp
> and noticed that the Put and Get functions don't accept wildcards.
> What's the best way to do it?  DOS batch files have a FOR command; does
> Rexx have something similar?

 /* Copies a single file from your
    workstation to a remote host  */

 rc = FtpPut(localFile,remoteFile<,"Binary"|"Ascii">)

Make a "DO" over a stem variable built from a  SysFileTree

  Function: SysFileTree

  Syntax:   rc = SysFileTree(filespec, stem, [options], [tattrib],
[nattrib])

       filespec  The filespec to search for.

       stem      The name of the stem variable to place the results.

                 Note:    stem.0 contains the number of files and/or
directories found.

=Dwight=
X1=L, X2=L & the domain is phonetic



Mon, 26 Mar 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting awk (or sed or anything else) to put single quotes into file

2. Getting directories with RxFtp

3. Getting rid of RxFTP Console Messages

4. GETTING MULTIPLE FILES VIA FTP

5. RxFtp file with name containing blanks

6. Put multiple matched lines into an array?

7. BUG?: HP-UX 10.20 and IO#gets followed by IO#puts

8. puts and gets over IP

9. Communication puts/gets

10. gets/puts - encoded ?

11. question on puts, gets and eof?

 

 
Powered by phpBB® Forum Software