A simple Python-based tool to generate multiple files instantly from a predefined list.
- Generate unlimited files in one run
- Supports any file type (
.py,.txt,.json, etc.) - Optional folder creation for organized output
- Minimal and fast CLI (TUI-style interaction)
- 🚩 Option to skip files with invalid names
⚠️ Option to automatically sanitize invalid filenames- 🛡️ Fail-safe mechanism to prevent crashes on Windows
- 📁 Automatic nested folder creation from file paths
File-Generator.py/
│
├── FileGenerator.py # Main script
├── Files List.txt # List of file names to generate
└── README.md # Documentation
-
Add file names to
Files List.txtExample:
test.py notes.txt config.json script.js invalid*file?.txt folder1 nested/file2.py -
Run the script:
python FileGenerator.py -
Follow the prompts:
🏠 Enter output path: C:\files\ 🦺 Do you want to create separate folder (y/n): y 📂 Enter folder name: generated_files ⚡ Files without extension (skip/folder): folder 🚩 Skip files with invalid name (y/n): n ⚠️ Remove invalid character from file name (y/n): y -
Done ✅ — all files will be created automatically.
C:\files\generated_files\
│
├── test.py
├── notes.txt
├── config.json
├── script.js
├── invalidfile.txt # cleaned automatically
└── nested\
└── file2.py
- Quickly scaffold project files
- Create test datasets
- Batch file creation for experiments
- Organize coding practice files
- Generate structured project folders instantly
- Make sure the output path exists
- Empty lines in
Files List.txtwill be ignored - File names without extensions can be skipped or treated as folders
- 🚫 Windows does not support characters like
< > : " / \ | ? * ⚠️ Invalid filenames can be skipped or automatically cleaned- Duplicate file names may overwrite existing files