organize_document_file
Copies or moves a document file into the COBie folder structure under {docs_root}/{SheetName}/{RowName} and returns the directory and filename for use in add_document.
Instructions
Copy/move a file to the standard COBie document location.
Target path: {docs_root}/{SheetName}/{RowName}/{filename}
Returns the Directory and File values to pass to add_document.
Use this to physically organize documents before adding metadata to Excel.
Args:
source_file_path: Path to source file
sheet_name: Target sheet (Component, Type, Space, etc.)
row_name: Target entity name
docs_root: Base folder for document organization
copy: If True, copy file (default). If False, move file.
filename_override: Optional filename to use instead of original
Returns:
Dictionary with directory, file, target_path, and success status
Example:
result = organize_document_file(
source_file_path="/tmp/AHU-1-manual.pdf",
sheet_name="Component",
row_name="AHU-1",
docs_root="project_docs"
)
# Returns: {"directory": "project_docs/Component/AHU-1", "file": "AHU-1-manual.pdf"}
# Then use in add_document
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| copy | No | ||
| row_name | Yes | ||
| docs_root | Yes | ||
| sheet_name | Yes | ||
| source_file_path | Yes | ||
| filename_override | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||