0

On my Windows desktop, I need some directory which must stay on the same place "forever".

It is itended primarly for images, which sometimes included into Markdown files. Here is how it works:

C:\Users\John\Desktop\Some Project\
                       |-- My Document.md

                           Which looks like this:
                            -----------------------
                           | My Document.md        |
                           |                       |
                           | Some text...          |
                           |                       |
                           | ![](C:\Static\foo.jpg |
                           |                       |
                           | Some text...          |
                           |                       |
                           | ![](C:\Static\bar.jpg |
                           |                       |
                           | Some text...          |
                           |                       |
                           | ![](C:\Static\baz.jpg |
                           |                       |
                            -----------------------

So, instead of keeping images in the same folder with document, I keep them in "Static". This allows me to use same images across multiple documents without duplicating.

However, when I studied in the university (few years ago), the teacher said something that could be related to my idea:

When you put some file in the root directory of the drive, it will speed up access to this file. However, when you have too many files in the root directory, the overall work of hard drive will be slowler.

But, I don't sure this quote is really related to my idea, because it seems a little difference between it and what my teacher said:

Teacher said     My idea
C:\foo.jpg       C:\Static\foo.jpg
C:\bar.jpg       C:\Static\bar.jpg
C:\baz.jpg       C:\Static\baz.jpg
etc              etc

So, my question:

Is it really related? I.e. is it a good idea (from the hard drive performace point of view) to keep thousands of images in C:\Static?

Or, probably, it will be better to keep them in %UserProfile%\Static?

Some technical notes:

  • I use hard drive, i.e. HDD, not SSD. The performance probably could be different.

  • As I said, I use Windows, and that means, my file system is NTFS.

1
  1. You add only one record to root directory - "Static". So it not noticeable impact performance.
  2. NTFS lesser impact on performance from too many files in directory (AFAIK directory indexed in NTFS).

UPD

  1. %UserProfile%\Static can be preferred for public distribution. As any unprivileged user can write there and create folders and files. Root folder can be not accessible. (As I understand it not Your case)
  2. If there really Huge amount of files (thousands) is better to distribute it by subdirectories (eg. Static/foo/foo0001.jpg ... Static/foo/foo1000.jpg, Static/bar/bar0001.jpg ... Static/bar/bar1000.jpg, ...)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.