知野好男|CAD・BIM Works

情報の一元化の前準備として、フォルダ・ファイル構造をJSON化する

共有フォルダの構造を階層JSONとして記録し、仕様別の検索用DBへ展開するための前準備をまとめます。

情報の一元化の前準備として、フォルダ・ファイル構造をJSON化する

共有フォルダの階層JSONと仕様分類DB JSONの関係を示すイメージ
2026-09-06

BIMをはじめ、建設・設計業務では「情報の一元化」の重要性がよく語られます。

しかし、実際の現場では、情報を一元化する以前に、既存の資料がどこに保存されているのか分からない、過去に対応した類似案件の資料を探すだけでも時間がかかる、といった状況が少なくありません。

「過去に対応した資料を参考にして図面を作成してほしい」と言われても、その参考資料自体を探すことが難しいケースもあります。

そこで今回は、CADやBIMデータに限らず、共有フォルダ内に保存されているフォルダ・ファイル構造全体をJSON形式でインデックス化し、今後の情報整理や検索、AI活用のための前準備とする方法について記録します。

1. フォルダ階層をJSON化するローカルツールの作成

まず、共有フォルダや案件フォルダの構造を把握するため、選択したフォルダ内のフォルダ・ファイル階層をJSON形式で出力するツールを作成します。

生成AIに、例えば以下のように指示することで、ローカル環境で動作するHTMLツールを作成できます。

選択したフォルダ内のフォルダ・ファイル階層を読み取り、JSON形式のインデックスを作成する、ローカル環境で動作するHTMLツールを作成してください。
フォルダやファイルに対しては読み取り専用とし、元データを書き換えたり削除したりしない安全な設計にしてください。
また、大規模なフォルダにも対応できるよう、読み取り中の進捗状況が分かるインジケーターを設けてください。
このツールによって、共有フォルダ全体の構造を、AIや別の検索・分類ツールで扱いやすいJSONデータとして保存できます。

重要なのは、既存のCADデータやBIMデータそのものを最初から整理し直すのではなく、まず「どこに、どのようなフォルダやファイルが存在しているのか」を一覧化することです。

2. 仕様分類用のDB JSONを作成する

フォルダ階層のJSONが作成できたら、次の段階として、そのJSONを読み込み、仕様ごとに整理した検索用の「DB JSON」を作成します。

フォルダ階層JSONは、既存の保存状態をそのまま把握するには適しています。一方で、「過去にこの仕様へ対応した案件を探したい」「似た仕様の図面や資料を検索したい」といった用途では、仕様ごとに整理されたDB形式のJSONのほうがシンプルで検索しやすくなります。

また、生成AIへデータを読み込ませ、案件や仕様を分類・検索するといった用途にも適しています。

まず、作成した階層JSONをAIにアップロードし、次の点を確認します。
  • どのような項目で仕様を分類すると検索しやすいか
  • ファイル名やフォルダ名から、どの程度まで仕様を推定できるか
  • 検索用DBとしてどのようなJSON構造が適しているか
そのうえで、AIに以下のようなツールの作成を依頼します。

フォルダ階層を記録したJSONファイルを読み込み、仕様ごとに分類した検索用DB JSONを作成する、ローカル環境で動作するHTMLツールを作成してください。
元の階層JSONは変更せず、分類結果を別のJSONファイルとして出力できる構成にしてください。
このように、「実際のフォルダ構造を記録した階層JSON」と「検索しやすい形に整理した仕様分類DB JSON」を分けて持つことで、既存の共有フォルダを大きく変更することなく、情報検索のための仕組みを追加できます。

BIMなどによって将来的に情報を一元管理することも重要ですが、その前段階として、現在存在している大量のフォルダや過去資料を「まず探せる状態にする」ことも、実務上は重要ではないかと考えています。

なお、フォルダ名やファイル名からAIが推定した分類は、元データそのものではありません。実務で利用する際は、分類結果を確認したうえで、検索補助データとして扱うことを前提とします。

English

Converting Folder and File Structures to JSON as a First Step Toward Centralized Information Management

September 6, 2026

In the construction and design industries, BIM and other digital technologies are often discussed in the context of “centralizing information.”

In practice, however, many workplaces face a more fundamental problem before information can even be centralized: no one clearly knows where existing documents are stored, and simply locating files from previous projects can take a considerable amount of time.

It is common to be asked to “create a drawing based on a similar project we handled in the past,” while finding that the previous project data itself is surprisingly difficult to locate.

In this article, I describe a preliminary approach to this problem: creating a JSON-based index of the entire folder and file structure of a shared directory, not limited to CAD or BIM data.

The objective is to create a foundation for future information organization, searching, and AI-assisted processing.

1. Creating a Local Tool to Convert a Folder Hierarchy into JSON

The first step is to understand the current structure of shared folders and project directories.

For this purpose, a simple tool can be created that reads the folder and file hierarchy of a selected directory and exports it as a JSON index.

For example, a generative AI can be instructed as follows:

Create a locally running HTML tool that reads the folder and file hierarchy of a selected directory and generates an index in JSON format.
The tool must operate in read-only mode and must not modify, overwrite, move, or delete any original folders or files.
It should also include a progress indicator so that the user can monitor the scanning status when processing large directory structures.
Using such a tool, the structure of an entire shared folder can be stored as JSON data that can later be processed by AI or other search and classification tools.

The important point is that there is no need to reorganize all existing CAD, BIM, and project data from the beginning. The first goal is simply to make it possible to identify what folders and files currently exist and where they are located.

2. Creating a Specification Classification Database in JSON

Once the folder hierarchy JSON has been created, the next step is to import that data and generate another JSON file organized by project specifications or other useful classification criteria.

The hierarchy JSON is suitable for representing the existing folder structure as it is. However, when the objective is to search for projects that previously used a particular specification, drawings created under similar conditions, or reference documents from comparable past projects, a simplified database-oriented JSON structure is often easier to search.

Such a structure is also more suitable for importing into generative AI systems for classification, filtering, and analysis.

A practical workflow is to first upload the hierarchy JSON to an AI system and ask it to examine the data and suggest:
  • which attributes should be used for specification-based classification,
  • how much information can be inferred from folder and file names, and
  • what JSON structure would be appropriate for a searchable database.
After determining the classification structure, the AI can then be asked to create another local HTML tool.

Create a locally running HTML tool that imports a JSON file containing a folder hierarchy and generates a separate database JSON file classified by specification.
The original hierarchy JSON must remain unchanged, and the classification results should be exported as a separate JSON file.
By maintaining two separate datasets — a hierarchy JSON representing the actual folder structure and a classification database JSON optimized for searching — it becomes possible to introduce a searchable information layer without significantly changing the existing shared-folder environment.

Centralizing information through BIM and other systems remains an important long-term objective. However, before attempting full information centralization, there is also considerable practical value in making the large amount of existing project data and historical documentation searchable in the first place.

Any classifications inferred by AI from folder or file names are not the source data itself. For practical use, the results should be reviewed and treated as search-support data rather than as a final technical judgment.
Navigation

この記事は「知野好男|CAD・BIM Works」の技術記事です。 / This article is part of Yoshio Chino CAD / BIM Works.