Skip to content

okradsllim/directory_audit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Directory Audit Tools

Overview

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.

Scripts

Step1.py

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 and openpyxl, formatted for easy analysis and further processing.

Step2.py (In Development)

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.

Technologies Used

  • Python: Core programming language.
  • pandas: For data manipulation and writing to Excel.
  • openpyxl: To handle Excel files.
  • os and shutil: For file system operations.
  • logging: To handle logging throughout the script.

Local Development

Prerequisites:

  • Python 3.6 or higher
  • pandas, openpyxl, and win32security (if running on Windows) packages installed.

Running the Scripts:

  1. Clone the repository:
    git clone https://github.com/yourusername/directory-audit-tools.git
  2. Navigate to the project directory:
    cd directory-audit-tools
  3. Install required packages:
    pip install pandas openpyxl
  4. Run Step1.py:
    python Step1.py
  5. After generating the Excel file with Step1.py and updating it with desired actions, run Step2.py:
    python Step2.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages