Two JScript tools to automatically organize files into date-based folders (YYYY-MM-DD format).
| Script | Files Processed | Date Source | Speed |
|---|---|---|---|
groupFilesByDate.js |
All files (except .js) | Last Modified Date | Fast: 7ms/file |
groupJpgByExif.js |
JPG/JPEG only | EXIF Shooting Date | Slower: 70ms/file |
- Creates folders named by date (e.g.,
2025-11-09) - Automatically moves files into corresponding date folders
- Reports number of folders created and files moved
- Prevents duplicate file overwrites
- Operating System: Windows (tested on Windows 10 & 11)
- Runtime: Windows Script Host (WScript)
- No installation required - uses built-in Windows components 😎
Both scripts follow the same usage pattern:
-
Place the script in the target folder
-
Run the script
- Double-click the
.jsfile
- Double-click the
-
Confirm the operation
- A dialog will show the number of files to be processed
-
Wait for processing
- Files will be moved into date-named folders progressively
groupJpgByExif.jswill display a PowerShell window during processing
-
Check the results
- A summary message shows folders created, files moved, and files skipped
Before:
📁 My Photos
🖼️ photo1.jpg (modified: 2025-01-11)
🖼️ photo2.jpg (modified: 2025-01-11)
🖼️ photo3.jpg (modified: 2025-01-14)
📄 document.pdf (modified: 2025-02-20)
📜 groupFilesByDate.js
📜 groupJpgByExif.js
After (using groupFilesByDate.js):
📁 My Photos
📁 2025-01-11
🖼️ photo1.jpg
🖼️ photo2.jpg
📁 2025-01-14
🖼️ photo3.jpg
📁 2025-02-20
📄 document.pdf
📜 groupFilesByDate.js
📜 groupJpgByExif.js
After (using groupJpgByExif.js):
📁 My Photos
📁 2025-01-11
🖼️ photo1.jpg
🖼️ photo2.jpg
📁 2025-01-14
🖼️ photo3.jpg
📄 document.pdf (not moved)
📜 groupFilesByDate.js
📜 groupJpgByExif.js
- Processes all file types except
.jsfiles - Uses DateLastModified property (not created date or EXIF)
- Processes JPG/JPEG files only
- Uses EXIF DateTimeOriginal (shooting date from camera)
- Slower - requires PowerShell to extract EXIF data
- Photos without EXIF data are skipped (e.g., screenshoot, internet image)
- Goal: Keep scripts small, portable, and easy to modify.
- Why not ExifTool? Requires external installation. PowerShell's
System.Drawingis built into Windows. - Why not pure PowerShell (.ps1)? Cannot be double-clicked to run. Requires command line knowledge.
- Solution: JScript wrapper provides GUI dialogs and can call PowerShell internally. Best balance of functionality and user experience.
| Script | Averge ms per file |
|---|---|
| groupFilesByDate.js | 7 ms |
| groupJpgByExif.js | 70 ms |
Inspired by work from Yulin Huang, 2013
- groupFilesByDate.js: 2025-11-09.001
- groupJpgByExif.js: 2025-11-09.004