how to index files in a directory using c++

March 4, 2011 at 08:59:48
Specs: Windows XP
basically i need to design a desktop crawler which will index all files(pdf, word, jpeg etc)in a drive and search them whenever asked so i need to know how to index them and open them using c++. i am confused with the mechanism and coding and have no idea for that.

See More: how to index files in a directory using c++

Report •

March 4, 2011 at 09:20:46
To start with you have to thoroughly understand the internal file formats of every application whose file you want to index. (How do you index a .jpeg? It's a picture!) That's going to be the tough part. The actual indexing is going to be fairly trivial; just read the files, extract the words (as I said, that's the tricky part) and then create the index. A B-tree is probably a good data structure for that.

But there is a perfectly good indexing system already built into Windows (and other Operating Systems), so I do wonder whether it is worth going to all that effort to reinvent the wheel.

Report •

March 7, 2011 at 08:44:33
Thank you so much for the reply.. basically my task is to list all files present in a specified directory and then index them, now extract data from the file so that it may be searched by words... i dont know how to elaborate all this and i am new to c++ as well, so it would be very kind if you elaborate all the details regarding it..Thanks

Report •

Related Solutions

Ask Question