File Operations Prompts
File Operations Prompts
Section titled βFile Operations Promptsβπ Languages: English | FranΓ§ais
15+ ready-to-use prompts for file organization, renaming, and cleanup
Organization Prompts
Section titled βOrganization Promptsβ1. Organize by File Type
Section titled β1. Organize by File TypeβOrganize all files in ~/Cowork-Workspace/input/ by file type.
Create these folders:- Documents (pdf, doc, docx, txt, md)- Spreadsheets (xls, xlsx, csv)- Images (jpg, jpeg, png, gif, svg)- Archives (zip, tar, gz, rar)- Other (everything else)
Move files to appropriate folders. Don't copy.Create a summary in ~/Cowork-Workspace/output/organization-report.txt showing:- Total files processed- Files per category- Any files that couldn't be categorized2. Organize by Date
Section titled β2. Organize by DateβOrganize files in ~/Cowork-Workspace/input/ by date.
Create year/month folder structure:- 2024/ - 01-January/ - 02-February/ - ...- 2025/ - ...
Use file modification date for sorting.Move files to appropriate folders.Save summary to ~/Cowork-Workspace/output/date-organization.txt3. Organize by Project
Section titled β3. Organize by ProjectβOrganize files in ~/Cowork-Workspace/input/ by project.
Analyze filenames and content to identify projects.Create a folder for each project identified.Put unclassifiable files in "Uncategorized/" folder.
Save a project index to ~/Cowork-Workspace/output/project-index.md with:- Project name- Number of files- File types present- Date range of files4. Organize Downloads Folder
Section titled β4. Organize Downloads FolderβOrganize my downloaded files in ~/Cowork-Workspace/input/downloads/
Create structure:- Applications/ (dmg, pkg, exe, app)- Documents/ (pdf, doc, docx, txt)- Images/ (jpg, png, gif, svg)- Videos/ (mp4, mov, avi, mkv)- Music/ (mp3, wav, flac, m4a)- Archives/ (zip, rar, tar, gz)- Code/ (js, py, html, css, json)- Other/
Move files appropriately. Delete empty source folders after.Report to ~/Cowork-Workspace/output/downloads-cleanup.txtRenaming Prompts
Section titled βRenaming Promptsβ5. Standardize Filenames
Section titled β5. Standardize FilenamesβRename files in ~/Cowork-Workspace/input/ to follow this pattern:YYYY-MM-DD_descriptive-name.ext
Rules:- Use file date for YYYY-MM-DD- Convert spaces to hyphens- Remove special characters- Convert to lowercase- Keep original extension
Create a rename log in ~/Cowork-Workspace/output/rename-log.csv with:Original Name, New Name, Date6. Add Prefix to Files
Section titled β6. Add Prefix to FilesβAdd prefix "[PROJECT-X]_" to all files in ~/Cowork-Workspace/input/
Keep original filename after prefix.Example: document.pdf β [PROJECT-X]_document.pdf
Log changes to ~/Cowork-Workspace/output/prefix-log.txt7. Sequential Numbering
Section titled β7. Sequential NumberingβRename files in ~/Cowork-Workspace/input/ with sequential numbers.
Pattern: 001_original-name.ext, 002_original-name.ext, etc.
Sort by: [file date / alphabetically / file size]Start numbering at: 001
Save mapping to ~/Cowork-Workspace/output/number-mapping.csv8. Remove Dates from Filenames
Section titled β8. Remove Dates from FilenamesβRemove date patterns from filenames in ~/Cowork-Workspace/input/
Patterns to remove:- YYYY-MM-DD- YYYYMMDD- DD-MM-YYYY- MM-DD-YYYY
Keep the rest of the filename intact.Log changes to ~/Cowork-Workspace/output/date-removal-log.txtCleanup Prompts
Section titled βCleanup Promptsβ9. Find Duplicates
Section titled β9. Find DuplicatesβFind duplicate files in ~/Cowork-Workspace/input/
Check for:- Exact duplicates (same content)- Similar filenames- Same size files
DO NOT DELETE ANYTHING.Create a report in ~/Cowork-Workspace/output/duplicates-report.md with:- Groups of potential duplicates- File sizes- Locations- Recommendation (which to keep)10. Archive Old Files
Section titled β10. Archive Old FilesβIdentify files older than [6 months / 1 year] in ~/Cowork-Workspace/input/
Create an archive folder: ~/Cowork-Workspace/input/archive-[date]/Move old files there (don't delete).
Create manifest in ~/Cowork-Workspace/output/archive-manifest.txt with:- Files archived- Original locations- File dates- Total size archived11. Find Large Files
Section titled β11. Find Large FilesβFind files larger than [100MB / 500MB / 1GB] in ~/Cowork-Workspace/input/
Create a report in ~/Cowork-Workspace/output/large-files.md with:- File path- Size- Type- Last modified date
Sort by size, largest first.Include total size of all large files.12. Empty Folder Cleanup
Section titled β12. Empty Folder CleanupβFind empty folders in ~/Cowork-Workspace/input/
List all empty folders found.DO NOT DELETE without my confirmation.
Report to ~/Cowork-Workspace/output/empty-folders.txt with:- Folder path- Parent folderFiltering Prompts
Section titled βFiltering Promptsβ13. Extract by File Type
Section titled β13. Extract by File TypeβCopy all [PDF / image / spreadsheet] files from ~/Cowork-Workspace/input/to ~/Cowork-Workspace/output/extracted-[type]/
Include files in subfolders.Maintain original subfolder structure in destination.Create a list of extracted files in ~/Cowork-Workspace/output/extracted-files.txt14. Filter by Filename Pattern
Section titled β14. Filter by Filename PatternβFind all files matching pattern "*[pattern]*" in ~/Cowork-Workspace/input/
Copy matching files to ~/Cowork-Workspace/output/matching-files/Create a list with full paths in ~/Cowork-Workspace/output/pattern-matches.txt15. Filter by Content
Section titled β15. Filter by ContentβFind all text files in ~/Cowork-Workspace/input/ containing "[search term]"
Create a report in ~/Cowork-Workspace/output/content-search.md with:- File path- Line numbers containing the term- Context (line before and after)
Copy matching files to ~/Cowork-Workspace/output/matching-content/Utility Prompts
Section titled βUtility Promptsβ16. Create Folder Structure
Section titled β16. Create Folder StructureβCreate this folder structure in ~/Cowork-Workspace/input/:
Projects/βββ Active/β βββ project-a/β β βββ docs/β β βββ assets/β β βββ deliverables/β βββ project-b/β βββ docs/β βββ assets/β βββ deliverables/βββ Completed/βββ Templates/
Confirm structure created.17. File Inventory
Section titled β17. File InventoryβCreate a complete inventory of ~/Cowork-Workspace/input/
Output to ~/Cowork-Workspace/output/inventory.xlsx with columns:- Filename- Path- Extension- Size (KB)- Date Modified- Type Category
Include summary sheet with:- Total files- Total size- Files by type- Files by yearPower User: Rule-Based Organization
Section titled βPower User: Rule-Based OrganizationβFrom real-world usageβcomplex sorting with explicit rules:
18. Multi-Rule Sorting System
Section titled β18. Multi-Rule Sorting SystemβCONTEXT: My ~/Cowork-Workspace/input/downloads/ has 200+ files accumulated over months.I need them organized for a project handoff.
TASK: Organize files following these rules in priority order:
RULES:1. Client files (containing "ClientX" or "ProjectY") β Clients/[ClientName]/2. Financial (invoices, receipts, quotes) β Finance/[Year]/3. Design assets (.psd, .ai, .fig, .sketch) β Design/4. Documentation (.doc, .pdf, .md) β Docs/[Topic]/5. Code/scripts β Code/6. Everything else β Archive/[Month-Year]/
OUTPUT:- Move files according to rules- Create ~/Cowork-Workspace/output/organization-manifest.xlsx with: - Original path, New path, Rule applied, Date moved- Summary counts per category
CONSTRAINTS:- Process in batches of 20 files (for token efficiency)- Ask confirmation before each batch- Never delete, only move- Report any ambiguous files for manual decisionToken Optimization for Large Operations
Section titled βToken Optimization for Large OperationsβFile organization consumes tokens rapidly. Optimize with these patterns:
Batching Strategy
Section titled βBatching Strategyβ| File Count | Approach | Why |
|---|---|---|
| 1-20 | Single request | Fits easily |
| 20-50 | 2-3 batched requests | Optimal efficiency |
| 50-100 | Checkpoint every 20 | Recovery on failure |
| 100+ | Sub-folder batches | Prevent context overflow |
19. Optimized Large Batch Processing
Section titled β19. Optimized Large Batch ProcessingβCONTEXT: ~/Cowork-Workspace/input/ contains 80+ files to organize.
TASK: Organize by type, but work efficiently:
APPROACH:1. First: List all files and create a sorting plan (don't move yet)2. Save plan to ~/Cowork-Workspace/output/sorting-plan.md3. Wait for my approval4. Then process in batches of 20 files5. After each batch, report progress and wait for "continue"
CONSTRAINTS:- Checkpoint progress after each batch- If interrupted, the plan file shows what's done vs remaining- Estimated total: 4-5 batches20. Resume After Interruption
Section titled β20. Resume After InterruptionβCONTEXT: File organization was interrupted.~/Cowork-Workspace/output/sorting-plan.md shows progress.Files marked [DONE] are already processed.
TASK: Continue from where we stopped.Process only items NOT marked [DONE] in the plan.
OUTPUT: Update sorting-plan.md as you process.Mark completed items with [DONE].Customization Notes
Section titled βCustomization NotesβReplace placeholders:
~/Cowork-Workspace/input/β Your actual input folder~/Cowork-Workspace/output/β Your actual output folder[brackets]β Your specific values
Add constraints as needed:
- βExclude hidden filesβ
- βProcess only top-level, not subfoldersβ
- βSkip files larger than Xβ
- βOnly process files from last 30 daysβ
Token budget awareness:
- Simple inventory: ~20K-30K tokens
- Small organization (10-20 files): ~30K-50K tokens
- Large organization (50+ files): ~80K-150K tokens
- Pro tier: Plan for 1-2 large operations per 5-hour window