Limit to number of files in a folder?

Discussion in 'Programming' started by amaze, Jun 2, 2007.

  1. #1
    Hi,

    We create a barcode for every order and store them in a folder /barcode. The files are <1kb less .gif's but is there a limit to how many files you can store in one folder?

    Its running on windows server 2003.

    Thanks
     
    amaze, Jun 2, 2007 IP
  2. Paul_Hopkinson

    Paul_Hopkinson Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    No there isn't - the only thing limiting it will be your harddrive space,

    You can use cfdirectory to get the total size of the files in the directory and if it is a certain amount then dont allow any more uploads and upload to another directory if you wanted to manually set a limit
     
    Paul_Hopkinson, Jun 2, 2007 IP
  3. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    No that's great just checking as we will have 100,000 files in there, just making sure no limitations within windows. :)
     
    amaze, Jun 2, 2007 IP
  4. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #4
    i'm intrigued to know why you're storing in the folder?
     
    datropics, Jun 3, 2007 IP
  5. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #5
    As they are created with a CFX tag that creates them on the FS. why do you feel it would be better to store in mySQL?
     
    amaze, Jun 4, 2007 IP
  6. newbish

    newbish Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The answer to this question depends on what file system your server is using. For example FAT16 has a limit of 65536 (2^16), FAT32 4294967296. I am unsure on the limit for NTFS but I believe it would be similar to FAT32.
     
    newbish, Jun 4, 2007 IP
  7. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #7
    Well if i get to 4294967296 orders I will be past caring ha ha :)

    Thanks for your help! :)
     
    amaze, Jun 4, 2007 IP
  8. datropics

    datropics Peon

    Messages:
    309
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #8
    I was thinking of portability.

    I wonder - what's the construct of your cfdirectory tag? Is it faster that an cfquery. Just wondering (taking into account that you can setup indexes on the database)
     
    datropics, Jun 4, 2007 IP
  9. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #9
    Well the images are accessed via HTTP. They are only created once with a CFX tag. I think its the best solution to store on the FS.
     
    amaze, Jun 4, 2007 IP
  10. drewbe121212

    drewbe121212 Well-Known Member

    Messages:
    733
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    125
    #10
    I agree. As long as you are not transversing (searching) through your directory, you will be fine, and size should have no issue. If you are searching I would consider something else, but since you say you access the files directly through http rather then searching, everything *should* be ok.
     
    drewbe121212, Jun 18, 2007 IP