inFile$ = UCASE$(COMMAND$) 'get the infile filespec
outFile$ = UCASE$(COMMAND$) 'get the outfile filespec
CLS
STDOUT "Add 2 blank lines every 60 lines"
STDOUT "Copyright (c) 2003 by dlb. All Rights Reserved."
STDOUT
'-------------------------------
IF LEN(inFile$) = 0 THEN
STDOUT "Usage: ADDLINE InFile.txt OutFile.txt"
STDOUT
END 1
END IF
'-------------------------------
OPEN inFile$ FOR INPUT AS #1
OPEN outFile$ FOR OUTPUT AS #2
'-------------------------------
DO WHILE NOT EOF(1)
LINE INPUT #1, a$
PRINT #2, a$
count = count + 1
IF count / 60 = INT(count / 60) THEN PRINT #2, ""
PRINT #2, ""
LOOP
'----------
CLOSE #1
CLOSE #2' THE
END
This kind of thing works in a simplistic form:
Function PbMain()
Dim sInput$, sInfile$, sOutfile$
Dim nPos&
sInput$ = Command$
nPos& = InStr(sInput$," ")
If nPos& Then
sInfile$ = UCase$(Trim$(Left$(sInput$,nPos&)))
sOutfile$ = UCase$(Trim$(Right$(sInput$,Len(sInput$) - nPos&)))
Else
stdout "MyUtil useage:"
stdout "MyUtil inputfilename outputfilename"
Exit Function
End If
stdout "Input file is: " & sInfile$
stdout "Output file is: " & sOutfile$
End Function
However, if you might be using longfilename fully qualified filenames, then
you'd need to start parsing for double-quotes, etc.
"Big-Dave" <dl...@sstar.com> wrote in message
news:bjnqtm$fao$1...@news.datasync.com...