home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
makeurl.zip
/
MAKEURL.CMD
Wrap
OS/2 REXX Batch file
|
1996-04-03
|
2KB
|
81 lines
/* */
Call RxFuncAdd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs';
Call SysLoadFuncs;
exp = 'explore.ini'
/* May need to change if desktop at C:\Desktop */
call syscls
say 'Location of Desktop? (Defaults to C:\Desktop): ';
pull desktop
desktop=STRIP(desktop)
if desktop='' then desktop='C:\Desktop'
/* Create a folder on the desktop */
where = '<WP_DESKTOP>'
ftitle = "URL Folder"
vals = 'OBJECTID=<Test>'
ret = SysCreateObject(WPFolder, ftitle, where, vals);
obj.path = desktop || '\' || ftitle
/* Find the location of the explore.ini file */
env = 'OS2ENVIRONMENT'
expfile = value('etc',,env)
if file = '' then
do
say 'Cannot find the TCP/IP etc environment'
exit
end
expfile = expfile || '\' || exp
do forever
x = linein(expfile);
if x = "[quicklist]" then
leave
end
count = 0;
bad.0 = 0;
bcount = 0;
do forever
obj.title = linein(expfile);
obj.url = linein(expfile);
if obj.title = "" then
leave;
count = count + 1;
parse var obj.title 'quicklist= ' obj.title
nfixed = translate(obj.title,'!','/');
nfixed = translate(nfixed,'!',':');
ofile = obj.path || '\' || nfixed;
rc=SysCreateObject("WebExplorer_Url", obj.title, obj.path);
if STREAM(ofile,'C','QUERY EXISTS') = "" then
do
bcount = bcount + 1;
bad.bcount = obj.title
end
xx = charout(ofile, obj.url );
if xx \= 0 then
do
say "cannot write to " ofile
bcount = bcount + 1;
bad.bcount = obj.title
end
call stream ofile, 'C', 'CLOSE'
end
say "Created " count "URL's from the explore.ini file"
exit
if bcount = 0 then
exit;
say bcount "URL's were created that did not have their links added to them"
say "These URL's are:"
do x = 1 to bcount
say ' 'bad.x
end