home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
drives.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-01-28
|
4KB
|
56 lines
/* A lovely little program by Dave Goran */
/*-----------------------------------------------------------------*\
| TEST132.CMD - Set all root directories to TREE and subs to ICON |
\*-----------------------------------------------------------------*/
call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
call SysLoadFuncs /* Register REXXUTIL.DLL */
/*---------------------------------*\
| Build string with drive letters |
\*---------------------------------*/
drive_list = SysDriveMap( 'C', 'LOCAL' )
/*--------------------*\
| Process each drive |
\*--------------------*/
do drive_number = 1 to WORDS( drive_list )
drive_letter_colon = WORD( drive_list, drive_number )
/*----------------------------*\
| Build array of directories |
\*----------------------------*/
call SysFileTree drive_letter_colon || '\*.*',,
'directory_stem',,
'DO' /* directory names only */
/*---------------------------------*\
| Set root directory to TREE view |
\*---------------------------------*/
say 'Processing: 'drive_letter_colon
call SysSetObjectdata drive_letter_colon, 'DEFAULTVIEW=TREE;'
if result <> 1 then
do
say 'Unable to set ' ||,
drive_letter ||,
' to tree view'
end
/*---------------------------------*\
| Set subdirectories to ICON view |
\*---------------------------------*/
if directory_stem.0 > 0 then
do sub_number = 1 to directory_stem.0
directory_name = directory_stem.sub_number
say 'Processing: 'directory_name
call SysSetObjectdata directory_name, 'DEFAULTVIEW=ICON;'
if RESULT <> 1 then
do
say 'Unable to set ' ||,
directory_name ||,
' to tree view'
end
end
end
exit