Re: [OT] files/dir on windoze
- Posted by "Juergen Luethje" <j.lue at gmx.de> Jul 07, 2004
- 612 views
Kat wrote: > On 3 Jul 2004, at 19:20, Juergen Luethje wrote: > >> Kat wrote: >> >>> I ran into a problem last night, and can't figure out why this is. In one >>> dir, >>> i have 14,301 txt files. So i go to create a new one, and Eu reports a bad >>> file. I try it manually, and Windoze reports: >>> >>> Unable to create the file "New Text Document.txt' >>> The directory of file cannot be created. >>> >>> Scandisk reported a filename too long in the directory, but it didn't fix >>> anything, and i cannot find any error. Does anyone have any experience with >>> this? >> >> I had experienced things like that in the past, too. Fortunately, >> recently this did not happen to me any more, so I recall this problem >> rather vaguely. IIRC Windows allows you to create files that have too >> long names, and after creation, it can't handle them any more. >> >> The first question IMHO is: How long is (or would have been) the *full* >> name (including path) of "New Text Document.txt"? Windows only allaws a >> maximum of 260 characters or so. >> >> Maybe you should move all "good" files in the regarding directory into a >> new directory (with a rather short name), and then (try to) delete that >> old corrupted directory. > > It's happened again, this time with a count of 14,172 files in another > directory. Is there a magic number i missed somewhere? You make me curious, and now I want to see what happens on my system. On my harddrive, there are 4096 bytes per cluster. When I want to create say 17000 small files, I need 17000*4096 bytes (about 66 MB) free disk space. Well, I've got that free space, so it's now Euphoria's turn, to create the files:
sequence number atom t integer fn t = time() for i = 1 to 17000 do number = sprintf("%05d", {i}) fn = open(number & ".txt", "w") puts(fn, "This is file #" & number) close(fn) end for t = time()-t ? t/60 puts(1, " minutes") if getc(0) then end if
It took about 18 minutes on my old PC. The last file is '17000.txt', containing the line "This is file #17000". I looks as if everything is correct on my system (Windows 98, FAT32). I think you are using Windows 95, and FAT16, right? But using the FAT16 system shouldn't cause the problem, should it? You wrote that Scabdisk didn't find an error. Maybe you should try a tool such as Norton Utilities? Sorry Kat, I think I can't be of much help ATM. Regards, Juergen