Index files and folders in windows

3

1

I want to create a database of all files and folders within a specific location (say, E:\movies).

How can I do this? Is there any software which can do this for me? Otherwise do I need to write code myself? (IMPORTANT: I need the database file created by the software. Not any software which can index and search files)

I need to collect the following informations (file or folder name, size, full location path).

Can a batch file do this job? If yes, how? (sample code please)

Sourav Ghosh

Posted 2014-10-16T22:32:40.113

Reputation: 572

Answers

2

locate32 is my favorite. I believe it creates a database file in the same format as locate on linux. There is source code available for it as well.

A batch file solution would be bound to be clunky and slow with the number of files you can store on hard drives nowadays, assuming you just made a text list of all files on a system.

localhost

Posted 2014-10-16T22:32:40.113

Reputation: 502

Do you have any idea, how those softwares index all files and folders? – Sourav Ghosh – 2014-10-17T20:29:03.167

I haven't checked, but like I said, there is source code available. The source will contain all the answers that you seek. Of course it will just scan the tree starting at the root, storing all the filenames in its database. – localhost – 2014-10-19T22:15:21.823

http://blog.codinghorror.com/learn-to-read-the-source-luke/ – localhost – 2014-10-19T22:43:05.143