https://github.com/jcherranz/folder-structure-script
PowerShell script for creating folder structure
https://github.com/jcherranz/folder-structure-script
automation directory-structure file-system folder-management powershell scripts windows
Last synced: 3 months ago
JSON representation
PowerShell script for creating folder structure
- Host: GitHub
- URL: https://github.com/jcherranz/folder-structure-script
- Owner: jcherranz
- Created: 2025-01-07T10:30:11.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-07T13:21:58.000Z (about 1 year ago)
- Last Synced: 2025-03-02T19:16:57.322Z (12 months ago)
- Topics: automation, directory-structure, file-system, folder-management, powershell, scripts, windows
- Language: PowerShell
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Folder Structure Script
A script to automatically create a hierarchical folder structure for expense tracking. Implemented in both PowerShell and Python.
## Features
- Creates year folders (2024-2026)
- Creates monthly subfolders with format YYYY_MM (e.g., 2024_01)
- Includes error checking to prevent duplicate folders
- Displays progress during creation
- Shows complete folder structure after completion
## Implementations
### PowerShell Version (`create_folders.ps1`)
- Native Windows solution
- No additional dependencies required
- Windows-specific path handling
- Built-in security features
Usage:
```powershell
.\create_folders.ps1
```
### Python Version (`create_folders.py`)
- Cross-platform compatible
- Uses modern pathlib library
- Clean, readable syntax
- Easy to extend
Usage:
```bash
python create_folders.py
```
## Folder Structure Created
```
Base Path
├── 2024
│ ├── 2024_01
│ ├── 2024_02
│ └── ...
├── 2025
│ ├── 2025_01
│ ├── 2025_02
│ └── ...
└── 2026
├── 2026_01
├── 2026_02
└── ...
```
## Requirements
For PowerShell version:
- Windows PowerShell 5.1 or later
- Administrator privileges (when creating folders in system directories)
For Python version:
- Python 3.6 or later
- No additional packages required
## Which Version Should I Use?
- Use the **PowerShell** version if:
- You're working exclusively in Windows
- You need native Windows integration
- You don't want to install additional software
- Use the **Python** version if:
- You need cross-platform compatibility
- You plan to extend the functionality
- You prefer Python's syntax
- You already have Python installed
## License
MIT License
## Author
jcherranz