#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    4
    Rep Power
    0

    File Management Application


    Hi there everyone,

    I am new to these forums, although I have been programming for a few years now. I mainly develop with PHP for the web, but recently I have been studying Python not only for web development, but for simple application development as well.

    I am getting ready to start a small project that will serve as a file management system for my desktop and my business partners desktop. The goal of this project is to automatically store downloaded file locations to a MySQL database running locally so that the files can be looked up in the database in the future. The program will also allow us to manually enter in file names and their locations as well.

    The main question I have regarding this project is how will I go about activating the database query automatically when a file is downloaded to the pc? Is there a way to have this program automatically do its functions (as stated above) every time a file is downloaded to the system?

    Thanks for your help!
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,997
    Rep Power
    481
    You could write a program that runs forever. Every time interval it inspects the directory for new files, and deals with the new ones. I hate this polling approach.

    Use a file system with which you can register your program. It would trigger your program execution when it stores a new file.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    4
    Rep Power
    0
    Originally Posted by b49P23TIvg
    You could write a program that runs forever. Every time interval it inspects the directory for new files, and deals with the new ones. I hate this polling approach.

    Use a file system with which you can register your program. It would trigger your program execution when it stores a new file.
    Any suggestions for such a file system?
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,997
    Rep Power
    481
    I'm sure it's possible with the hurd.

    I searched, briefly, for
    file system and (callback or hook)
    to get you started.

    There might---must---be kernel or file system hooks.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo