home *** CD-ROM | disk | FTP | other *** search
- /*********************************************************/
- /* */
- /* rexx:DNetPutFiles.rexx V1.0 */
- /* */
- /* ARexx script for DNet's putfiles */
- /* */
- /* Requires rexxarplib.library V3.0 */
- /* */
- /* © 1991 Stefan Becker */
- /* */
- /* ToolManager configuration file entry for this script: */
- /* */
- /* CLI: */
- /* Alias = Put Files */
- /* RealName = rx DNetPutFiles */
- /* Path = <path to DNet binaries> */
- /* # */
- /* */
- /* Problems: MULTISELECT requires, that you select ALL */
- /* files with the mouse. It won't work, if you */
- /* simply type in the name :-( This seems to */
- /* be a bug in rexxarplib. */
- /* */
- /*********************************************************/
-
- /* Parse command line */
- PARSE ARG cmdline
-
- /* Set constants */
- output='CON:0/0/640/100/Uploading Files/AUTO/WAIT/ALT/INACTIVE'
-
- /* Empty commandline? */
- IF cmdline=='' THEN
- DO
- /* Try to open rexxarplib */
- IF ~SHOW('Libraries','rexxarplib.library') THEN
- IF ~ADDLIB('rexxarplib.library',0,-30,0) THEN RETURN 20
-
- /* Yes, put up a file requester */
- GetFile(50,50,,,'Select file','Workbench','MULTISELECT PATGAD',files,,,'~(#?.info)')
-
- /* Build new command line */
- DO i=1 TO files.0
- cmdline=cmdline '"'files.i'"'
- END
- END
-
- IF cmdline=='' THEN
- /* No files selected */
- DO
- /* Print out an error message */
- IF OPEN(error,output,'Write') THEN
- DO
- WRITELN(error,'No files selected')
- WRITELN(error,'exiting...')
- CLOSE(error)
- END
- END
- /* Upload files */
- ELSE ADDRESS COMMAND 'putfiles >"'output'"' cmdline
-
- /* Exit script */
- RETURN 0
-