Jump to content

database of files in folder and show in html


arjdat

Recommended Posts

hi

 

i am an absolute newbie in this thing.

 

i have a phpmyadmin table with columns name, date and time of copy.

 

is it possible with php code that if a new file comes into a folder the code automatically inserts its name and the date and time of copy (not the creation or modification time, but the time it was copied in that folder) into my database table?

 

i need the list to retain the names even if the file is moved from that folder or deleted. if a file with same name comes twice (after it was deleted) the entry should be twice.

 

also a text log generation of the same listing would be great.

 

many many thanks in advance

Link to comment
Share on other sites

It is possible, but doing so would require the editing of operating system files. You would have to append something to the OS functions for file traversing/copying/deleting/etc... that triggers a php script to execute as a command in the background. I myself have no idea where to even begin doing such a thing, but editing the OS files is definitely where you would sniff around.... and that could have hazardous effects if you do not know what you are doing.

 

Surely there is some software out there that can keep up with your file modification actions so that you don't have to risk your OS.

Link to comment
Share on other sites

This depends upon the OS you're using, with Linux possibly being the easiest one to get something like this to work. In any case, you will need to involve other languages/tools than PHP, in order to be able to use dnotify or libnotify.

 

this google search should provide you with all of the information you need, to set up a system like this.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.