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)


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.

| improve this answer | |
  • Do you have any idea, how those softwares index all files and folders? – Sourav Ghosh Oct 17 '14 at 20:29
  • 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 Oct 19 '14 at 22:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.