This repository contains two Python scripts developed as part of my involvement in the Documentation Audit Task Force at the ADU (Beinecke). The goal of this task force was to audit current and legacy documentation across different units and develop a plan for effective documentation management that aligns with organizational standards.
Functionality:
- Traverses a specified directory.
- Collects metadata about all files and folders within the directory, allowing for the exclusion of specified folders.
- Outputs the collected data to an Excel file, which includes both a raw data view and a hierarchical view of directories and files.
Key Features:
- Exclusion of user-specified folders during the audit process.
- Error logging to handle and track exceptions during runtime.
- Outputs metadata to an Excel file using
pandas
andopenpyxl
, formatted for easy analysis and further processing.
Intended Functionality:
- Processes an Excel file generated by
Step1.py
which includes user-defined actions for files and folders (such as move, rename, or delete). - Executes these actions based on the input provided in the Excel file, allowing for a dynamic and customizable approach to file management.
Key Features (Planned):
- Parsing of Excel to read actions and perform them on the filesystem.
- Safety checks to ensure actions are valid and do not result in data loss.
- Detailed logging of actions performed and any issues encountered.
- Python: Core programming language.
pandas
: For data manipulation and writing to Excel.openpyxl
: To handle Excel files.os
andshutil
: For file system operations.logging
: To handle logging throughout the script.
Prerequisites:
- Python 3.6 or higher
pandas
,openpyxl
, andwin32security
(if running on Windows) packages installed.
Running the Scripts:
- Clone the repository:
git clone https://github.com/yourusername/directory-audit-tools.git
- Navigate to the project directory:
cd directory-audit-tools
- Install required packages:
pip install pandas openpyxl
- Run Step1.py:
python Step1.py
- After generating the Excel file with Step1.py and updating it with desired actions, run Step2.py:
python Step2.py