In article <58e77a...@sick-of-spam.invalid>,
Bob Latham <b...@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
> 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