Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. folder size limitation

folder size limitation

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raphael Kindt
    wrote on last edited by
    #1

    Hi world, I'm want limiting a folder size. My application create some files inside this folder but I don't want exceed the desired size. Thus this application must delete older files when I want to add new file (to always respect the size limitation). Anybody have an idea to do that? Thank in advance... Hello World!!! :) from Raphaël

    V D 2 Replies Last reply
    0
    • R Raphael Kindt

      Hi world, I'm want limiting a folder size. My application create some files inside this folder but I don't want exceed the desired size. Thus this application must delete older files when I want to add new file (to always respect the size limitation). Anybody have an idea to do that? Thank in advance... Hello World!!! :) from Raphaël

      V Offline
      V Offline
      vikramlinux
      wrote on last edited by
      #2

      U may monitor that specified folder ReadDirectoryChangesW is the API it gives u many notifications (including size change, files added etc) I hope this will help u

      1 Reply Last reply
      0
      • R Raphael Kindt

        Hi world, I'm want limiting a folder size. My application create some files inside this folder but I don't want exceed the desired size. Thus this application must delete older files when I want to add new file (to always respect the size limitation). Anybody have an idea to do that? Thank in advance... Hello World!!! :) from Raphaël

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Rather than handle this at the software level, why not use quotas offered by the OS? If you must attack this via software, a rough example is located here. It's specific to cookies, but you can alter the code as necessary to clean out old files.


        "Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups