TIP: Click on subject to list as thread! ANSI
echo: os2rexx
to: All
from: Eddy Thilleman
date: 1999-09-21 23:41:04
subject: hstart wget?

Hello All,

I made a REXX file wgetmir.cmd to read all the lines in a textfile which are
the websites or files on internet to retrieve with wget. wget is running OK
when hstarted from a command line or a plain batch file, but not from the REXX 
file (no screen output or no log file if log file is specified). Does someone
spot what I'm doing wrong?

------------------- begin of wgetmir.cmd -------------------
/* start wget mirroring each website/file listed in wget.mir */
arg InFile

if InFile = '' then
  InFile = 'wget.mir'

'@echo off'
dir = directory( 'c:\www' )
'set wgetrc=c:\www\wget.cfg'

dquote = d2c(34)  /* " double quote character */
squote = d2c(39)  /* ' single quote character */
cmd1 = ' wget -m -c -nc -np -Q1m --tries=1 -k -w1 '
cmd2 = ' -a wgetmir'
cmd3 = '.log>nul'

signal on notready

LineNr = 0

LineIn( InFile, 1, 0 )
   /* No read; opens inputfile */
   /* (if file is already open, sets the read position to the first line). */

do while Lines( InFile ) > 0
  Line = LineIn( InFile )
  LineNr = LineNr + 1
  say LineNr': 'Line
  cmd = cmd1||Line||cmd2||LineNr||cmd3
  "hstart /win /c b " cmd
end

exit

NotReady:
  if LineNr = 0 then
    say 'could not open 'InFile

exit
-------------------- end of wgetmir.cmd --------------------

  Greetings   -=Eddy=-        email: eddy.thilleman@net.hcc.nl

... WindowError:019 User error.  It's not our fault.  Is not!  Is not!
--- GoldED/2 3.0.1
* Origin: Windows95 is a graphic DOS extender (2:500/143.7)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.