Re: [OT] files/dir on windoze

new topic     » goto parent     » topic index » view thread      » older message » newer message

Irv Mullins wrote:

> Juergen Luethje wrote:
>>
>> Unfortunately, this error message is not much more specific than
>> Euphoria's error massage. Anyway, there is increasing evidence that this
>> is a general Windows issue, isn't it? But nobody on this list has heard
>> about it before ...?
>
> No, and I haven't been able to find anything via Google, either.
> Granted, not many people are likely to have 17,000 files in any
> one directory (with LFN's). We know the problem does not occur
> with Eu on Linux, so it's presumably not a Eu problem.

I also don't think that it's an Eu problem. I made an additional test to
prove that. My new test program wrote 10,000 files not to 1 directory,
but to 2 directories:

constant
stuff = " is the number of this file. Euphoria is cool."
      & " The weather is fine today.txt"

sequence path, number, name
atom t
integer fn

t = time()

path = "c:\\c1\\"
for i = 0 to 4999 do
   number = sprintf("%04d", {i})
   name = number & stuff
   fn = open(path & name, "w")
   puts(fn, "This is file #" & number)
   close(fn)
end for

path = "c:\\c2\\"
for i = 5000 to 9999 do
   number = sprintf("%04d", {i})
   name = number & stuff
   fn = open(path & name, "w")
   puts(fn, "This is file #" & number)
   close(fn)
end for

t = time()-t
printf(1, "2x5000 files written to 2 dirs, each filename"
        & " consisting of %d characters."
        & "\n%.2f minutes"
        & "\n\nPress Enter ...", {length(name), t/60})
if getc(0) then end if


As expected, there was no problem running this program, since there were
less than the "magic limit" smile of 8192 (me) or 8193 (Elliot) files per
directory.

Note: Contrary to the previous test, now each filename consists of only
      80 characters, because I used
           number = sprintf("%04d", {i}).
      Previously, each filename consisted of 81 characters, because
           number = sprintf("%05d", {i})
      was used.

However, my assumption was that also in this case the "magic limit"
might be the same as before.

Then I tried to copy all files from dir 'c:\c2\' to 'c:\c1\', using
Total Commander on Windows. Total Commander aborted with an error, that
said (translation to English by me):
"Error: Unable to write 'c:\c1\8191 is the number ...'"

Then, examinating directory 'c:\c1\', I found all files intact, from
#0000 to #8190.

Summary:
Using Euphoria to create files with names that consist of 81 characters
each, 8192 files per directory are possible on my system.
Using Total Commander to copy files with names that consist of 80
characters each, 8191 files per directory are possible.

Doesn't sound logically, but is true. smile

> Does this happen with all versions of Windows, or just some?

Kat wrote she was using Win 95B, I was using Win 98 (partition with
FAT 32, 7.58 GB total, 5.14 GB free, 4096 bytes per cluster). Elliot,
on what Windows version did you run your test?

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu