matlab file indexing problem with many file
Show older comments
Hi, i need to understand if matlab ca be integrated with windows indexing service and use his data for find new file position and then elaborate it. At this time i've build a matlab application who recursive find file in a directory but cause the great amount of data the directory grow every day and more fill, more time to elaborate..... Anybody can indicate a solution to solve this issue?? Or what is the correct way... best regards, Alessandro.
3 Comments
Jan
on 30 Dec 2014
The question is not clear. What do you want to achieve? How should the indexing service be used to find "a new file position"? Why does your tool create a large data set?
Alessandro
on 31 Dec 2014
Edited: Alessandro
on 31 Dec 2014
Jan
on 31 Dec 2014
It is not clear, which part of the analysis takes more time. If the processing of the data is the main factor, please use the debugger to find the bottlenecks and post the code. If searching the files is the problem, please post the code also, because there could be many different causes for a slow down. It is impossible to make meaningful suggestions for the acceleration of code when the code itself is not known.
Answers (2)
dpb
on 30 Dec 2014
1 vote
"Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search."
Jan
on 31 Dec 2014
If you work with Windows, you can let the operating system search for files written after a certain date:
Date = '08.01.2014'; % Use a date in your local date format!
Folder = 'D:\';
[status, result] = system(['forfiles /P ', Folder, ' /C "cmd /c echo @path" /S /D +', Date]);
FileList = regexp(result, char(10), 'split');
FileList = strrep(FileList, '"', '');
For the 230.000 files on my D-disk this needs 13 seconds. But I've measured it the second time I've called this function. Perhaps the file system data are stored in the disk cache, so it might be slower for the first time.
I do not see a connection to any kind of "indexing", because the problem does not concern the contents of the files. The actual problem is the idea to store 350GB of data in text files and use the date of the file system to identify new files. This is simply not the job of a file system, but this requires a data base. It is like putting a pile of index cards in a bathtub and check each single card when a specific question is asked. When a course solution can be implemented efficiently in Matlab based on the current set of files, it might be much to slow when you get twice as much files. A dedicated data base would be much smarter, because this is exactly the job data bases are designed for.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!