batch-file-organizer
Organize large collections of files into categorized folders. Use this skill when you need to move or copy 100+ files into multiple destination folders based on classification data. Handles PDF, DOCX, PPTX and other file types while preserving original filenames and content.
- License 许可
- MIT
- 最近更新
- 2026-10-02
- Stars
- ★ 92
- Forks
- 7
01 前言 Front Matter
- name
- batch-file-organizer
- description
- Organize large collections of files into categorized folders. Use this skill when you need to move or copy 100+ files into multiple destination folders based on classification data. Handles PDF, DOCX, PPTX and other file types while preserving original filenames and content.
03 SKILL.md 正文
Batch File Organizer
Overview
This skill provides a systematic approach to organizing large numbers of files into multiple destination folders based on a classification mapping. It ensures all files are processed, no files are lost, and original content/names are preserved.
Key Principles
- Non-destructive: Never modify file content or names
- Complete coverage: Every file must be assigned to exactly one destination folder
- Verification: Track which files have been moved to prevent duplicates or omissions
- Efficiency: Use batch operations to handle hundreds of files
Process Workflow
Phase 1: Preparation
- Create all destination folders if they don't exist
- Verify write permissions to destination directories
- Create a manifest file tracking all source files
- Document the classification mapping (source file → destination folder)
Phase 2: Migration
- Process files in batches to prevent overwhelming the system
- Use move (not copy) operations to save space
- Verify each file arrives at destination
- Log any failures for manual intervention
Phase 3: Verification
- Count files in each destination folder
- Compare against classification manifest
- Confirm no files remain in source directory
- Verify no files are corrupt or missing
Implementation Details
Destination Folder Structure
/root/LLM/
/root/trapped_ion_and_qc/
/root/black_hole/
/root/DNA/
/root/music_history/
Classification Mapping Format
Create a mapping that associates each source file with a destination folder:
filename1.pdf → LLM
filename2.pdf → trapped_ion_and_qc
filename3.docx → black_hole
filename4.pptx → DNA
filename5.pdf → music_history
Batch Processing
- Process 10-20 files at a time to allow for verification
- After each batch, verify destination folders received the files
- Log any errors and retry failed files
Error Handling
File already exists in destination: Skip or rename with timestamp suffix Permission denied: Report and request elevated privileges File in use: Wait briefly and retry Corrupted file: Log and continue; flag for manual review
Verification Commands
After organizing:
ls -la /root/LLM/ | wc -l
ls -la /root/trapped_ion_and_qc/ | wc -l
ls -la /root/black_hole/ | wc -l
ls -la /root/DNA/ | wc -l
ls -la /root/music_history/ | wc -l
Compare totals against original file count to ensure complete migration.
Special Considerations
- Symlinks: If symlinks are encountered, move the actual file, not the link
- Hidden files: Include hidden files in the migration if they match classification
- Case sensitivity: Be aware of case-sensitive filenames in Linux
- File extensions: Preserve original extensions even if unexpected (e.g., .txt files should be classified by content, not extension)
04 同仓库更多 Skills
object_counter
Count occurrences of an object in the image using computer vision algorithm.
travel-planning-workflow
Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.
bundled-dataset-search-tool
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
glm-output
Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final /root/metrics.json.
glm-calibration
Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.
glm-basics
A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.