| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: REXX - How Does One Quote An Apostrophe ? |
Don{ald} O. Woodall schrieb:
> Hello REXX Quoters
>=20
> This is going to be long and involved again; due to my
> apparent failure to fully explain my project, or to be
> convinced of its unnecessity.
>=20
> OS/2 Ctrl+Esc =3D Window List Type HELP =3D help 21:02:52 Sat 4-02-20=
05
>=20
> [H:\APPS\DIR-TREES\MAKETREE\DRIVE-F]dir
>=20
> The volume label in drive H is APPS & DATA.
> The Volume Serial Number is CCFA:E914.
> Directory of H:\APPS\DIR-TREES\MAKETREE\DRIVE-F
>=20
> 10-22-04 3:42p 2,243 1,905 a--- get-dir-lst.cmd
> 3-21-05 8:12p 109,941 0 a--- drive-f-dir-lst
>=20
> 10-17-04 4:15p 3,932 3,297 a--- ucdir.cmd
> 4-02-05 4:34a 5,255 4,344 a--- ptucdir.cmd
> 4-02-05 4:35a 117,467 0 a--- drive-f-dir-lst-quc
>=20
> 10-22-04 12:14a 12,390 10,662 a--- sortdirlevel.cmd
> 4-02-05 4:37a 636 29 a--- drive-f-dir-lst-qucl0.cmd
> 4-02-05 4:36a 4,240 0 a--- drive-f-dir-lst-qucl1.cmd
> 4-02-05 4:36a 7,377 0 a--- drive-f-dir-lst-qucl2.cmd
> 4-02-05 4:36a 4,600 0 a--- drive-f-dir-lst-qucl3.cmd
> 4-02-05 4:36a 10,208 0 a--- drive-f-dir-lst-qucl4.cmd
> 4-02-05 4:36a 22,699 0 a--- drive-f-dir-lst-qucl5.cmd
> 4-02-05 4:36a 22,913 0 a--- drive-f-dir-lst-qucl6.cmd
> 4-02-05 4:36a 22,926 0 a--- drive-f-dir-lst-qucl7.cmd
> 4-02-05 4:36a 19,462 0 a--- drive-f-dir-lst-qucl8.cmd
> 4-02-05 4:36a 5,292 0 a--- drive-f-dir-lst-qucl9.cmd
> 21 file(s) 381,850 bytes used
> 10-09-04 8:24a 1,323 587 a--- attrib-r.cmd
> 10-27-04 4:21a 4,821 4,463 a--- blnk-in-dir.cmd
> 10-19-04 12:07p 4,125 3,697 a--- countdirs.cmd
>=20
> [H:\APPS\DIR-TREES\MAKETREE\DRIVE-F]
>=20
> Most people would simply issue the command
>=20
> XCOPY X: Y: /H/O/T/S/E/R/V
True, yes.
> and feel they had accomplished what I am trying to accomplish with this
> project.
>=20
> Me? I want to know that, with 2 exceptions, that I have pre-built
> the Drive "X:" directory tree in UPPER CASE on Drive
"Y:" !!! BEFORE !!!
> I do the XCOPY.
>=20
> I have been doing this to my satisfaction for about 6 months now wit=
h
> my DATA and APPLICATION drives.
>=20
> However, OPERATING SYSTEM drives have a complication that has taken
> me about 6 months to: understand, come to terms with, figure out. That i=
s
> "folders!"
From sight of the WPS each and any directory IS a folder, including=20
the WPS itself.
> When the term "folders" was first thrown in my face; I was simple
> blown out of the water. I had no more navy. Then about a week later, I
> got mad when I realized that a folder is nothing but a directory!!!!!!
>=20
> Well, I finally realized that: folders are nothing but
> directories, BUT they are in a unique location! and can therefore be
> easily dealt with on an exception basis. All the folders can be found in
> one of two places:
>=20
> 1. X:\DESKTOP\
>=20
> 2. X:\OS2\ARCHIVES\...
>=20
> I do not want to do either:
>=20
> 1. Capitalize these folder names
>=20
> 2. Remove any spaces in the names
Easy. You needs another stem containing each full qualified path you=20
does NOT like upper/lowercase. With lastpos('\', path) or with
dirp =3D filespec("drive", path) || filespec("path", path)
you'll split drive:\path from a path containing a filename.
Check throug the pathlist if the path (basic path is in the exception=20
lis and left of the parse upper/lower.
It is really time that you learns how to write REXX to make thinks=20
simple. I don't like anymore to write the procedures for you - it's=20
not my job to do so. Learn to understund REXX before you tries to work=20
around the real problems you have.
> With this recent and new understanding, I am ready to grow, enhance,
> modify my programs so they can successfully deal with "Operating
System"
> drives also.
>=20
> The Sequence
> ------------
>=20
> Step 1
> ------
>=20
> 10-22-04 3:42p 2,243 1,905 a--- get-dir-lst.cmd
> 3-21-05 8:12p 109,941 0 a--- drive-f-dir-lst
>=20
> The program "Get-Dir-Lst.Cmd" needs enhancement. However, with a
> little external manual help it is getting the job done.
>=20
> In the lst 3 months of trying to upgrade My hard drives, I have lost
> data. At one point, I had upgraded this program. It is some of the lost
> data.
>=20
> Copy "Get-Dir-Lst.Cmd" to the desired drive and run it.
> Then copy the resulting report, here named "Drive-F-Dir-Lst"
> back to my Data drive.
Wrong! It needs to be removed and replaced with the procedures you've=20
gotten already. You can extend them to anything you needs in detail.=20
The procedure you received last is designed to give you eaxh and any=20
file and each and any directory file by file and directory by=20
directory in hand to handle it in any way you need.
So you can do anything you likes with a file and its name knowing=20
exactly that it is a file and directory for directory to do whatever=20
you likes to do with it and its name.
You have definitely no need to check for spaces or other characters,=20
you may upper or lowercase the name, you may left off that or not, you=20
may create a directory with that name or not, you may copy the file=20
with the same name or another name. You may remove the file or=20
directory or not....=F6
It seems absolutely that you are simply unwilling to learn.
> Step 2
> ------
>=20
> This is the current work in progress.
>=20
> "ptucdir.cmd" is the WIP program. Once everything is working
> perfectly, it will be renamed "ucdir.cmd."
>=20
> 10-17-04 4:15p 3,932 3,297 a--- ucdir.cmd
> 4-02-05 4:34a 5,255 4,344 a--- ptucdir.cmd
> 4-02-05 4:35a 117,467 0 a--- drive-f-dir-lst-quc
>=20
> Ucdir.cmd takes
>=20
> 3-21-05 8:12p 109,941 0 a--- drive-f-dir-lst
>=20
> as it input data, which is just directory paths. There is not a file nam=
e
> to be found in that file. Working as desired and designed.
>=20
> Ucdir.cmd them, with the two directory exceptions mentioned above,
> goes through and UPPER CASES the directory names.
>=20
> The second recent addition is to put ALL the directory paths in
> quotes so REXX can then make directories with spaces in their names.
>=20
> Ucdir.cmd then outputs the file:
>=20
> 4-02-05 4:35a 117,467 0 a--- drive-f-dir-lst-quc
>=20
> Step 3
> ------
>=20
> 10-22-04 12:14a 12,390 10,662 a--- sortdirlevel.cmd
>=20
> Now, the file:
>=20
> 4-02-05 4:35a 117,467 0 a--- drive-f-dir-lst-quc
>=20
> is used as input by the program "sortdirlevel.cnd" and,
depending on how
> deeply nested the directory tree is, outputs fils in a manor illustrated
> below.
>=20
> 4-02-05 4:37a 636 29 a--- drive-f-dir-lst-qucl0.cmd
> 4-02-05 4:36a 4,240 0 a--- drive-f-dir-lst-qucl1.cmd
> 4-02-05 4:36a 7,377 0 a--- drive-f-dir-lst-qucl2.cmd
> 4-02-05 4:36a 4,600 0 a--- drive-f-dir-lst-qucl3.cmd
> 4-02-05 4:36a 10,208 0 a--- drive-f-dir-lst-qucl4.cmd
> 4-02-05 4:36a 22,699 0 a--- drive-f-dir-lst-qucl5.cmd
> 4-02-05 4:36a 22,913 0 a--- drive-f-dir-lst-qucl6.cmd
> 4-02-05 4:36a 22,926 0 a--- drive-f-dir-lst-qucl7.cmd
> 4-02-05 4:36a 19,462 0 a--- drive-f-dir-lst-qucl8.cmd
> 4-02-05 4:36a 5,292 0 a--- drive-f-dir-lst-qucl9.cmd
> OK!, this is an issue neither Herbert nor anyone else has addressed.=
=20
> This is necessary because at some magic unknown
> number of directories these resulting "REXX Programs" CRASH!!!!
No idea what that should do. You've gotten a procedure that runs=20
recursivele through all directories on disk. You gets therin each=20
filename with full qualified path and each directory name with full=20
qualifierd path on disk, one by one. It is completey on you what you=20
likes to do with each file and each path, you can handle hidden files=20
too - it is YOU who has to leard hwo sysfiletree() works and what it=20
can do for you and what other REXX functions and which REXX commands=20
and functions are there. Nothing you've telled yet requires that you=20
have to use a cmd command - but REXX commands and functions.
As you have telled that you have unlimited time you would have years=20
of time to learn what somebody else had to do in hours. Learn REXX! It=20
is easy, really easy as many, many folks has proven already. Forget=20
your concept and start from scratch. The result would be much easier.=20
Get notice the functions you received already and accept that as=20
primitve base that does the minimum already but needs to be extended a=20
little bit to do each and anything you have ever dreamed of.
The only you needs more is: learn to read and write REXX.
> In my minds eye, it somewhere after creating 2,0xx directories
> everything comes to a screeching halt.
>=20
> THE CURRENT PROBLEM
> -------------------
>=20
> I am using:
>=20
> 4-02-05 4:36a 4,600 0 a--- drive-f-dir-lst-qucl3.cmd
>=20
> as an example. This also effects all the rest of the programs which are
> trying to create directories at a deeper level.
>=20
> So, it is a BIG DEAL.
>=20
> /* The name of this file is: drive-f-dir-lst-qucl3.Cmd */ /* =
=
=20
> */
> 'md "APPS\ACROBAT405\ADOBE\ACROBAT 4.0"'
> 'md "APPS\ACROBAT51\ADOBE\ACROBAT 5.0"'
> 'md "APPS\INNOWIN\ALL USERS\START MENU"'
> 'md "APPS\INNOWIN\APPLICATION DATA\INTERTRUST"'
> 'md "APPS\INNOWIN\DRIVERS\ETC"'
> 'md "APPS\INNOWIN\MY DOCUMENTS\MY EBOOKS"'
> 'md "APPS\INNOWIN\PROFILES\ALL USERS"'
> 'md "APPS\INNOWIN\PROGRAM FILES\COMMON FILES"'
> 'md "APPS\INNOWIN\START MENU\PROGRAMS"'
> 'md "APPS\JCLU\BIN\NOTPATH"'
> 'md "APPS\JCMD\BIN\NOTPATH"'
> 'md "Desktop\Internet\Web^Sites\eComStation^Distributors"'
> pull nada
> 'md "Desktop\Internet\Web^Sites\News^Media"'
> 'md "Desktop\Internet\Web^Sites\Search and^Reference"'
> 'md "Desktop\Internet\Web^Sites\Shopping^Online"'
> 'md "Desktop\Internet\Web^Sites\Software &^Development"'
> 'md "Desktop\Internet\Web^Sites\Technology^Media"'
> 'md "Desktop\Local^Network\Network^Utilities\File and Print!!Client
> Resource!!Browser"' 'md
"Desktop\Local^System\Help^Center\Inform^ation"'
> 'md "Desktop\Local^System\Help^Center\Trouble^Shooting"'
> 'md
"Desktop\Local^System\Install^Remove\Uninstall^Features^Folder"'
'md
> "Desktop\Local^System\System^Setup\Appearance"'
> 'md "Desktop\Local^System\System^Setup\Fonts"'
> 'md "Desktop\Local^System\System^Setup\Hardware^Manager"'
> pull nada
> 'md "Desktop\Local^System\System^Setup\Network"'
> 'md "Desktop\Programs\Develop^ment\IBM!!Developer's!!Toolkit!!version
> 4.5"'
That hurts hard, very hard! You've no control of failtures, you've no=20
control about the results. SysCreateOvbject() gives you absolutely=20
more control. You may even use SysMkDir() to create a directory when=20
you means that syscreateobject is too complicated for you.
You may still insert
trace ?I
in a line of a procedure to go through it step by step to see what a=20
single statement does. The you gets a REXX commamdline where you can=20
type each rexx command you likes, e.g. say var to show its content.
But learn REXX as it makes anything much, very much easier as to=20
wriggle with something around.
> Explanatory note: the line "pull nada" is a pause. It stops the
> action so I can visually see and comprehend if there was any problem in
> the programs execution. If no problems, press ENTER and the program
> continues.
no a trace command gives you more freedom to debug your REXX procedure.
> 'md "Desktop\Programs\Develop^ment\IBM!!Developer's!!Toolkit!!version
> 4.5"'
>=20
> REXX throws a hissy fit at the line above because of the apostrophe
> in the word "Developer's" - unmatched QUOTES.
>=20
> Anyone have a solution?
Write it as "....Developer''s....."
You MUST double the quote char to say REXX that you means the char=20
itself not ists meaning as quote char.
--=20
Tschau/Bye
Herbert Rosenau eCS 1.2 Deutsch bestellen bei
EDV Beratung & Programmierung http://pc-rosenau.de
Eichelsdorfer Str. 15 http://ecomstation.de
97461 Hofheim i.UFr.
Tel: 49-9523-502834
Fax: 49-9523-502823 http://www.dv-rosenau.de/
=20
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/os2user/
To unsubscribe from this group, send an email to:
os2user-unsubscribe{at}yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
=20
---
* Origin: Waldo's Place USA Internet Gateway (1:3634/1000)SEEN-BY: 633/267 270 5030/786 @PATH: 3634/1000 12 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.