0

I need to write some software to catalog files in a directory hierarchy. The directories of this hierarchy nominally follow
this structure:

Country
City
Technology_Type
Date

Files are then placed under the Date directory. The problem is that until now, files are copied into the hierarchy manually. Occaisionally files have been placed in the wrong spot, and directories below the top level have, occasionally, been created at the wrong spot, or out of order, in the hierarchy.

My initial approach is to use the directory information as meta data (country, city, date) to generate a database entry for each file. While I can recursively traverse the directories, I'm not sure of the best approach to verify (or determine) that a directory that I think is, say, a city, really is a city; not a tech_type.

The directory holds a sufficient number of files (> 1 million) to make manual cleanup a non-starter. This is more theory oriented question, I suppose, but since I will be doing this in Java I put it here. Thanks for any pointers.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by fraenckel
0

Is this a java programming problem or a database usage problem?

I guess I should have put my last sentence at the beginning. This is probably more of theory question than Java or DB specific. Perhaps it should be moved. If so, I don't know to which topic.

Sorry for the confusion.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.