Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6230

Re: file list order OS_GBPB

Path csiph.com!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed3-a.proxad.net!nnrp1-2.free.fr!not-for-mail
From "John Williams (News)" <UCEbin@tiscali.co.uk>
Subject Re: file list order OS_GBPB
Newsgroups comp.sys.acorn.programmer
Date Thu, 31 Dec 2020 13:01:19 +0000 (GMT)
Message-ID <58e77cf42dUCEbin@tiscali.co.uk> (permalink)
References <58e77aed9dbob@sick-of-spam.invalid>
User-Agent Pluto/3.18 (RISC OS/5.29) NewsHound/v1.52-32
Organization Poor
Lines 33
NNTP-Posting-Date 31 Dec 2020 14:02:39 CET
NNTP-Posting-Host 86.128.200.29
X-Trace 1609419759 news-1.free.fr 24255 86.128.200.29:52773
X-Complaints-To abuse@proxad.net
Xref csiph.com comp.sys.acorn.programmer:6230

Show key headers only | View raw


In article <58e77aed9dbob@sick-of-spam.invalid>,
   Bob Latham <bob@sick-of-spam.invalid> wrote:

> I'm writing a routine to scan the text files in a directory and make
> some small changes. What I would like to know is, what file
> operations will change the order the files are presented as in R4
> such that I need to scan again from R4=0 to avoid missing a file.

For this sort of thing I normally use EnumDir to give me a list of
filenames to operate with.  It has the advantage of creating a list the
order of which is then irrelevant!  Also its pattern-matching option can be
helpful.

> I am changing the file name, by adding /txt, changing the line
> endings from  LF to CR-LF and finally restoring the time stamp.

> Or will none of that change the order?

I don't see why it should.

But having a list to work with avoids such a possibility.  This could also
be used to create a Wipe list so that you are effectively modifying to a
copy (as you're adding an extension), saving the final wipe until all has
been well-proven to be the result you expected - another handy
possibility/advantage of the list method!

You only need to action the "Wipe" in the finished version after extensive
testing!

Best wishes, 
 
John

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

file list order OS_GBPB Bob Latham <bob@sick-of-spam.invalid> - 2020-12-31 12:39 +0000
  Re: file list order OS_GBPB Gerald Holdsworth <nospam@hollypops.co.uk> - 2020-12-31 13:00 +0000
    Re: file list order OS_GBPB Bob Latham <bob@sick-of-spam.invalid> - 2020-12-31 13:15 +0000
  Re: file list order OS_GBPB "John Williams (News)" <UCEbin@tiscali.co.uk> - 2020-12-31 13:01 +0000
    Re: file list order OS_GBPB Bob Latham <bob@sick-of-spam.invalid> - 2020-12-31 13:27 +0000
  Re: file list order OS_GBPB Martin <News03@avisoft.f9.co.uk> - 2020-12-31 13:41 +0000
    Re: file list order OS_GBPB Bob Latham <bob@sick-of-spam.invalid> - 2020-12-31 14:26 +0000
  Re: file list order OS_GBPB druck <news@druck.org.uk> - 2020-12-31 13:42 +0000
    Re: file list order OS_GBPB Bob Latham <bob@sick-of-spam.invalid> - 2020-12-31 14:28 +0000

csiph-web