Preserving EAs when deleting lines from a file. 
Author Message
 Preserving EAs when deleting lines from a file.

I use REXX to search text files for specific lines, and remove
those lines. Naturally, when I use SysFileDelete() and rewrite
the file, the EAs are gone. Specifying line 1 for lineout() does
not delete lines after line 1, it just basically does a line by
line overstrike, so the file does not shrink in size.

I thought I'd found the silver bullet I was looking for with the
'REPLACE' command of OREXXs STREAM function. While it streamlines
the code a bit, it behaves like SysFileDelete() was called, and
all the EAs are toast. I seem to recall that FILEREXX did not
give the expected result either.

Is there an approach to this that I haven't thought of, or am I
going to have to 'Get' and 'Put' the EAs before and after the
rewrite?

--------
Regards,

Tim
--------



Tue, 10 Aug 1999 03:00:00 GMT  
 Preserving EAs when deleting lines from a file.


 TB> Is there an approach to this that I haven't thought of, or am I
 TB> going to have to 'Get' and 'Put' the EAs before and after the
 TB> rewrite?

How about EAUTIL ?

Ave,

Andre Doff



Tue, 10 Aug 1999 03:00:00 GMT  
 Preserving EAs when deleting lines from a file.

Quote:
> Is there an approach to this that I haven't thought of, or am I
> going to have to 'Get' and 'Put' the EAs before and after the
> rewrite?

Yes!

 --------------------------------------------------------------
 Dick Goran            author, REXX Reference Summmary Handbook
 C F S Nevada, Inc.     Contrib. Ed., Personal Systems Magazine
 953 E. Sahara Ave, Suite 9B                     [OS/2 Advisor]
 Las Vegas, NV 89104-3012          CompuServe:       71154,2002

 702-732-3847 FAX
                    http://www.cfsrexx.com
              (see our new OS/2 game - CFSPoker)



Sun, 15 Aug 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. deleting newline from last line in file

2. Deleting lines in a file

3. how to delete the a line in a file

4. Deleting and appending lines in ASCII files

5. Deleting a number of lines from a .txt file

6. deleting top line from a file

7. FileUtils - :preserve does not preserve mtime of directories on Windoze

8. delete one line of a file???

9. Delete a certain line from a file

10. delete lines in file

11. Deleting first line of a file

12. Delete all lines of a file (Newbie)

 

 
Powered by phpBB® Forum Software