/*

	$VER: makedosscript.rexx 2.18 (1.11.97)

	© 1997 Wojciech Kocjan

	makes an AmigaDOS script which copies the selected files (useful
	if you have Aminet CDs, MountFTP + Internet access or have just
	copied the entire Aminet onto your Amiga :-)
	
	WARNING! If you wish to copy the files with the original path
	saved you need to have the directories created earlier.

*/

OPTIONS RESULTS
OPTIONS FAILAT 21

Address 'ANETGUI'

lstfile = GETCLIP("ANETGUI_ML_LSTFILE")

if lstfile = "" THEN lstfile = ""

'ReqFile "'lstfile'" "Enter list filename" SAVEMODE'
if rc~=0 THEN Exit
lstfile = result
CALL SETCLIP('ANETGUI_ML_LSTFILE',lstfile)

'Entries'
entries = result

IF ~OPEN(bfile, lstfile, 'Write') THEN EXIT

'GaugeOpen "Making list...*nPlease wait" 'entries' 0 "%ld/'entries'"'
do entry=0 to entries-1
	'Gauge' (entry+1)
	'GetPath ' entry
	apath = result

	WRITELN(bfile,apath)
end entry
CALL CLOSE(bfile)
'GaugeClose'
Exit
