Max size of a directory

T

T. Valko

Hi Folks!

From within Excel I generate simple text files (*.txt) and name them in
sequence: File1.txt, File2.txt, File3.txt, etc, etc.

The average size of one of these files is about 210 bytes.

I need to generate "a lot" of these files. Specifically, I need 2622 of
these text files.

My question is: can I put all 2622 of these files in a single directory?

What's the max size of a directory?

I haven't tried it yet. If I can do this it will make my life much easier!
 
P

Pegasus \(MVP\)

T. Valko said:
Hi Folks!

From within Excel I generate simple text files (*.txt) and name them in
sequence: File1.txt, File2.txt, File3.txt, etc, etc.

The average size of one of these files is about 210 bytes.

I need to generate "a lot" of these files. Specifically, I need 2622 of
these text files.

My question is: can I put all 2622 of these files in a single directory?

What's the max size of a directory?

I haven't tried it yet. If I can do this it will make my life much easier!

Yes, you can put all 2622 files into one folder. The limit
is "zillions" but file access will slow down to a crawl after
a few 100,000 files. For best speed I would not go above
10,000 files per folder.
 
T

Terry R.

The date and time was 6/24/2008 11:14 AM, and on a whim, T. Valko
pounded out on the keyboard:
Hi Folks!

From within Excel I generate simple text files (*.txt) and name them in
sequence: File1.txt, File2.txt, File3.txt, etc, etc.

The average size of one of these files is about 210 bytes.

I need to generate "a lot" of these files. Specifically, I need 2622 of
these text files.

My question is: can I put all 2622 of these files in a single directory?

What's the max size of a directory?

I haven't tried it yet. If I can do this it will make my life much easier!

If your disk if formatted using NTFS, you won't hit the a limit. FAT32
had about 65k per.

A different limit is how bogged down Windows Explorer gets. The more
files in the directory, the longer it takes for Explorer to open. Get
too many, and Explorer will crash.

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 
T

T. Valko

Pegasus (MVP) said:
Yes, you can put all 2622 files into one folder. The limit
is "zillions" but file access will slow down to a crawl after
a few 100,000 files. For best speed I would not go above
10,000 files per folder.

Great! This will save me from a ton of tedious, monotonus work.

Now I can just click a button and be done.

Thanks!
 
T

T. Valko

Terry R. said:
The date and time was 6/24/2008 11:14 AM, and on a whim, T. Valko pounded
out on the keyboard:


If your disk if formatted using NTFS, you won't hit the a limit. FAT32
had about 65k per.

A different limit is how bogged down Windows Explorer gets. The more files
in the directory, the longer it takes for Explorer to open. Get too many,
and Explorer will crash.

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.

The number of files will never exceed 2622. So I should be good to go!

Thanks!
 
T

Tim Slattery

T. Valko said:
Hi Folks!

From within Excel I generate simple text files (*.txt) and name them in
sequence: File1.txt, File2.txt, File3.txt, etc, etc.

The average size of one of these files is about 210 bytes.

I need to generate "a lot" of these files. Specifically, I need 2622 of
these text files.

My question is: can I put all 2622 of these files in a single directory?
Yes.

What's the max size of a directory?

If FAT32, you can have 64K entries in a directory. A file or
subdirectory with a name longer than 8.3 or containing spaces, commas,
or other non-standard characters will take from two to thirteen
entries (depending on length).

In the NTFS system there is no per-directory limit. There is a
per-partition limit, but you're not likely to get there.
 
P

PhilHibbs

A word of warning to anyone else reading this thread, though, is that
with a *very* large number of files (hundreds of thousands, possibly
just tens of thousands), you get weird errors when issuing Command
Prompt commands in the directory. This is because you get short file
names generated that cause a file to match a pattern that it should
not if you only consider the long file name. So, if you do "dir 123*",
or "del 123*", then you might display or delete some files that do not
begin with 123.

Phil Hibbs.
 
T

Terry R.

The date and time was 6/24/2008 11:53 AM, and on a whim, T. Valko
pounded out on the keyboard:
The number of files will never exceed 2622. So I should be good to go!

Thanks!

Depends on your CPU, RAM, hard disk speed, etc. But I think you should
be okay.

--
Terry R.

***Reply Note***
Anti-spam measures are included in my email address.
Delete NOSPAM from the email address after clicking Reply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top