/*
 $VER:DLX-FileListGenerator 0.7ß (05.11.94)
*/

/*-------------------------------------------------------------------------*/
/*		!!! Hier muß der Pfad des DXSF eingetragen werden !!!      */
/*-------------------------------------------------------------------------*/

Pfad='SYS:C/'

/*-------------------------------------------------------------------------*/

options results
NL = '0A'X

parse upper arg Port

if Port ="" then do
  say '[32m[41m!!! Kein Aktueller DopusPort übergeben !!![31m[40m'
  exit
end

address (Port)

GetSelectedFiles '7f'X
Files=result
if Files='RESULT' then do
  say '[32m[41m!!! Keine Files Selectiert !!![31m[40m'
  exit
end
Status 3
Active=result
Status 13 Active
Source=result
len=length(Files)

i=LASTPOS('7f'X,Files)
do forever
  i=LASTPOS('7f'X,Files)
  if i = 0 then leave
  Files=overlay(NL,Files,i,1)
  if i~=len then Files=Insert(Source,Files,i)
end

Files=insert(Source,Files,0)

open(lst,'T:DXSF-LISTE','W')
  writeln(lst,Files)
close(lst)

address command Pfad||'DXSF T:DXSF-Liste L'
address command 'c:delete >NIL: T:DXSF-LISTE'

address (Port)

ReScan

exit
