Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #6228 > unrolled thread
| Started by | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| First post | 2020-12-31 12:39 +0000 |
| Last post | 2020-12-31 14:28 +0000 |
| Articles | 9 — 5 participants |
Back to article view | Back to comp.sys.acorn.programmer
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
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2020-12-31 12:39 +0000 |
| Subject | file list order OS_GBPB |
| Message-ID | <58e77aed9dbob@sick-of-spam.invalid> |
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
[toc] | [next] | [standalone]
| From | Gerald Holdsworth <nospam@hollypops.co.uk> |
|---|---|
| Date | 2020-12-31 13:00 +0000 |
| Message-ID | <kqidnYoZFJQXVnDCnZ2dnUU78b-dnZ2d@brightview.co.uk> |
| In reply to | #6228 |
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
[toc] | [prev] | [next] | [standalone]
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2020-12-31 13:15 +0000 |
| Message-ID | <58e77e392ebob@sick-of-spam.invalid> |
| In reply to | #6229 |
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
[toc] | [prev] | [next] | [standalone]
| From | "John Williams (News)" <UCEbin@tiscali.co.uk> |
|---|---|
| Date | 2020-12-31 13:01 +0000 |
| Message-ID | <58e77cf42dUCEbin@tiscali.co.uk> |
| In reply to | #6228 |
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
[toc] | [prev] | [next] | [standalone]
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2020-12-31 13:27 +0000 |
| Message-ID | <58e77f57e4bob@sick-of-spam.invalid> |
| In reply to | #6230 |
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
[toc] | [prev] | [next] | [standalone]
| From | Martin <News03@avisoft.f9.co.uk> |
|---|---|
| Date | 2020-12-31 13:41 +0000 |
| Message-ID | <58e780a789News03@avisoft.f9.co.uk> |
| In reply to | #6228 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2020-12-31 14:26 +0000 |
| Message-ID | <58e784bfa1bob@sick-of-spam.invalid> |
| In reply to | #6233 |
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
[toc] | [prev] | [next] | [standalone]
| From | druck <news@druck.org.uk> |
|---|---|
| Date | 2020-12-31 13:42 +0000 |
| Message-ID | <rskkgm$ddb$1@dont-email.me> |
| In reply to | #6228 |
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
[toc] | [prev] | [next] | [standalone]
| From | Bob Latham <bob@sick-of-spam.invalid> |
|---|---|
| Date | 2020-12-31 14:28 +0000 |
| Message-ID | <58e784f9c5bob@sick-of-spam.invalid> |
| In reply to | #6234 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.sys.acorn.programmer
csiph-web