home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
netdor2.zip
/
DISK_10
/
IMAGE9.ZIP
/
OPEN.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-08-20
|
3KB
|
100 lines
/*****************************************************************************
* OPEN - Open Folder View of a Directory *
* CORE Development (CORE at WATSON) *
*****************************************************************************
* Licensed Materials-Property of IBM *
* 5604-472 (c) Copyright IBM Corporation, 1993 *
* All rights reserved. *
* US Government Users Restricted Rights - *
* Use, duplication or disclosure restricted *
* by GSA ADP Schedule Contract with IBM Corp. *
*****************************************************************************/
trace 'O'
Object = ''
Type = ''
parse upper arg Args
Args = strip(Args)
do while Args <> ''
if abbrev(Args, '"')
then parse var Args '"' Arg '"' Args
else parse var Args Arg Args
if abbrev(Arg, '?')
then signal Tell
else if wordpos(Arg, 'DEFAULT SETTINGS ICON TREE DETAILS') > 0
then if Type = ''
then Type = Arg
else signal Tell
else if Object = ''
then Object = Arg
else signal Tell
end
call rxFuncAdd 'sysLoadFuncs', 'REXXUTIL', 'sysLoadFuncs'
signal on syntax name NoRexxUtil
call sysLoadFuncs
signal off syntax
if Object = ''
then Object = directory()
else do
Object = strip(Object,,'"')
if \abbrev(Object, '?') & \abbrev(Object, '<')
then do
Home = directory()
New = directory(Object)
if New <> ''
then Object = New
call directory Home
end
end
if Type = ''
then Type = 'DEFAULT'
signal on syntax name WrongRxUtil
Failure = \sysSetObjectData(Object, 'OPEN='Type';')
signal off syntax
if Failure & \abbrev(Object, '<')
then Failure = \sysSetObjectData('<'Object'>', 'OPEN='Type';')
if Failure
then say 'Could not open' Type 'view of "'Object'".'
exit
Tell:
say
say ' OPEN - Open the a folder view of the current directory.'
say
say ' OPEN [object [view]] or OPEN [view [object]]'
say
say ' "Object" can be a absolute or relative directory name, or an OS/2'
say ' object name. The default is the current directory.'
say ' "View" can be any of DEFAULT, SETTINGS, ICON, TREE or DETAILS. The'
say ' default is DEFAULT.'
say
say ' Examples:'
say ' OPEN D:\OS2\SYSTEM DETAILS'
say ' OPEN ICON D:\OS2'
say ' OPEN TREE'
say ' OPEN ..'
say ' OPEN "<WP_NOWHERE>"'
say ' OPEN "?:\README"'
say
exit
NoRexxUtil:
if rc = 43
then do
say ' OPEN: Error loading REXXUTIL library. OPEN only works on'
say ' OS/2 2.x systems and REXXUTIL.DLL must be available.'
end
else say rc 'Something strange just happened...'
exit 0
WrongRxUtil:
if rc = 43
then do
say ' OPEN: REXXUTIL.DLL on your system does not include the'
say ' SysSetObjectData function. OPEN can not be used.'
end
else say rc 'Something strange just happened...'
exit 0