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

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.

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.