• file list order OS_GBPB

    From John Williams (News)@21:1/5 to Bob Latham on Thu Dec 31 13:01:19 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gerald Holdsworth@21:1/5 to Bob Latham on Thu Dec 31 13:00:57 2020
    On 31/12/2020 12:39, Bob Latham 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.

    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?

    Thanks.

    Bob.


    ADFS tends to store the files in alphanumerical order (or should that be
    ASCII order?). DFS stores them in the order the data is on the disc (and
    sorts them into alpha order when you *CAT).

    Cheers,

    Gerald.

    --
    gerald at hollypops dot co dot uk
    Repton Resource Page
    www.reptonresourcepage.co.uk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Latham@21:1/5 to All on Thu Dec 31 12:39:11 2020
    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.

    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?

    Thanks.

    Bob.

    --
    Bob Latham
    Stourbridge, West Midlands

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From druck@21:1/5 to Bob Latham on Thu Dec 31 13:42:42 2020
    On 31/12/2020 12:39, Bob Latham 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.

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

    I wouldn't do any operations on a directory while scanning it. Get a
    list of all the files you are interested in from the scan, then fiddle
    with the files afterwards.

    Or will none of that change the order?

    Anything altering just the file's data such as CR/LF changes wont affect anything in the directory, but renaming files might, depending on the underlying filing system. Filecore plays nice, others may not.

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin@21:1/5 to Bob Latham on Thu Dec 31 13:41:44 2020
    In article <58e77aed9dbob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    Or will none of that change the order?

    Basically there is NO defined order which OS_GBPB returns files.

    Best never to rely on it if you want it work always on all FS.

    --
    Martin Avison
    Note that unfortunately this email address will become invalid
    without notice if (when) any spam is received.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Latham@21:1/5 to UCEbin@tiscali.co.uk on Thu Dec 31 13:27:27 2020
    In article <58e77cf42dUCEbin@tiscali.co.uk>,
    John Williams (News) <UCEbin@tiscali.co.uk> wrote:
    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.

    EnumDir, I've never ever used that or even looked at it.

    I'll give that a read/look.

    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.

    It does indeed.

    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!

    I get what you're saying, I'll have a think about that thanks.

    Cheers,

    Bob.

    Best wishes,

    John

    --
    Bob Latham
    Stourbridge, West Midlands

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Latham@21:1/5 to Gerald Holdsworth on Thu Dec 31 13:15:11 2020
    In article <kqidnYoZFJQXVnDCnZ2dnUU78b-dnZ2d@brightview.co.uk>,
    Gerald Holdsworth <nospam@hollypops.co.uk> wrote:

    ADFS tends to store the files in alphanumerical order (or should
    that be ASCII order?). DFS stores them in the order the data is on
    the disc (and sorts them into alpha order when you *CAT).

    Glad I asked the question, I didn't know that, thanks.

    Bob.

    --
    Bob Latham
    Stourbridge, West Midlands

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Latham@21:1/5 to druck on Thu Dec 31 14:28:56 2020
    In article <rskkgm$ddb$1@dont-email.me>,
    druck <news@druck.org.uk> wrote:
    On 31/12/2020 12:39, Bob Latham 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.

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

    I wouldn't do any operations on a directory while scanning it. Get
    a list of all the files you are interested in from the scan, then
    fiddle with the files afterwards.

    I can see the logic in that.

    Or will none of that change the order?

    Anything altering just the file's data such as CR/LF changes wont
    affect anything in the directory, but renaming files might,
    depending on the underlying filing system. Filecore plays nice,
    others may not.

    Thanks Dave

    Cheers,

    Bob.

    --
    Bob Latham
    Stourbridge, West Midlands

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Latham@21:1/5 to Martin on Thu Dec 31 14:26:27 2020
    In article <58e780a789News03@avisoft.f9.co.uk>,
    Martin <News03@avisoft.f9.co.uk> wrote:
    In article <58e77aed9dbob@sick-of-spam.invalid>,
    Bob Latham <bob@sick-of-spam.invalid> wrote:
    Or will none of that change the order?

    Basically there is NO defined order which OS_GBPB returns files.

    Best never to rely on it if you want it work always on all FS.

    Got that,

    thanks Martin.


    Cheers,

    Bob.

    --
    Bob Latham
    Stourbridge, West Midlands

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)