Jump to content

How to keep trace a file after it's renamed or moved?


Recommended Posts

Hi guys!

I want to figure a way to keep trace of a number of certain files. Let's say I have a list of files at a time, and the next time I run the code, if any file was moved or renamed, it would be able to notice and report the new name or new path corresponding to the old one. It would be great if it's gonna notice had the file been deleted or any other type of changes made since the last time it checked. Can anyone help or throw me an idea?

It would help also if anyone can tell me is there a way to identify a file other than using a long full name?

I've been searching for a while but without result :unsure:.

Link to comment
Share on other sites

hi HoangTuHieu,

How about making a file indexing script? :unsure:

Question #1: What do you mean file indexing?

Answer #1: Specifically speaking, file indexing (here) refers to the process of creating and maintaining a relational database of file attributes.

A synopsis/roadmap:

Index the files (using SQLite, and a recursive implementation of _FileListToArray() perhaps), with hashes (), filename, filepath etc.

After some changes, index them (the files) again then compare results of indexing with some nifty SQL queries (learn SQL), and display/write a report to your liking using one (or many) of the various available methods of displaying/

Hope this helps. :>

-smartee

Link to comment
Share on other sites

Hi guys!

I want to figure a way to keep trace of a number of certain files. Let's say I have a list of files at a time, and the next time I run the code, if any file was moved or renamed, it would be able to notice and report the new name or new path corresponding to the old one. It would be great if it's gonna notice had the file been deleted or any other type of changes made since the last time it checked. Can anyone help or throw me an idea?

It would help also if anyone can tell me is there a way to identify a file other than using a long full name?

I've been searching for a while but without result :unsure:.

Maybe will help?

Or

Edited by JoHanatCent
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...