-
File Pair Management
-
Automatically detects
.nef
(RAW) files missing corresponding.jpg
counterparts -
Moves orphaned
.nef
files to anunpaired/
directory
-
-
Statistics & Logging
-
Provides detailed file counts:
-
Total
.nef
and.jpg
files -
Paired (NEF+JPG) and unpaired NEF files
-
-
Logs all moved files with timestamps to
unpaired.log
-
Saves pre-/post-processing stats in
file_stats.log
-
-
Flexible Options
-
Recursive directory scanning (
-r
) -
Dry-run mode (
--dry-run
) for testing -
Custom log file support (
-l filename
)
-
-
Error Handling
-
Checks write permissions
-
Handles filenames with spaces/special characters
-
./script.sh [-r|--recursive] [-d|--dry-run] [-l|--log filename]
Outputs:
-
Orphaned
.nef
files moved tounpaired/
-
Detailed console/file reports
Optimized for:
-
Nikon photographers managing RAW+JPEG libraries
-
Identifying "lost" RAW files
-
Batch cleanup of photo directories
Requirements: Bash 4+, standard GNU utilities (find
, mv
).
./unpaired.sh -r|--recursive
- recursive processing (include subdirectories)
./unpaired.sh -d|--dry-run
- previews changes without any file operations (test)
./unpaired.sh -l|--log filename
- writing the operation log to the specified file