pt is a command line tool transfers photos and videos from a source
directory to a destination using variables.
pt requires exiftool to be installed and
available within the PATH.
Download latest version:
$ wget https://download.compounddata.com/projects/pt/v0.4/pt_linux_amd64.tar.xz
$ tar xvf pt_linux_amd64.tar.xz
Only linux builds on amd64 and arm64 are supported at this time.
-source the source directory, where photos and videos are stored-destination the destination directory with the argument also accepts variables-dry-run don’t transfer, just print. Destination directories will
still be created.-interactive interactive transfer. Ask before copy or move.-move move files instead of copy.-mtime copy or move files based on modification timestamp. Similar
to find(1) -mtime test option where signed integer represents
number of days before (-) or after (+) modification timestamp of
file.%YR full year of the recording (e.g., 2006)%yR last two digits of the year of the recording (e.g., 06)%mR full month name of the recording (e.g., January)%mmR abbreviated month name of the recording (e.g., Jan)%mmmR padded month of the recording (e.g., 01)%DR day of the month of the recording (e.g., 2)%dR padded day of the month of recording (e.g., 02)%DyR padded day of the year of the recording (e.g., 002)%HR hour of the recording (e.g., 15)%MR minute of the recording (e.g., 4)%mR padded minute of the recording (e.g., 04)%FP name of file (e.g., DSC09895.JPG)%FlP name of file lowercase (e.g., dsc09895.jpg)Copy photos and videos from /media/camera/DCIM/100MSDCF to ~/photos
using full year of the recording as directory and rename file to when it
was created in the format of YYYYmmDD-HHMMSSmmm.JPG.
$ pt -source /media/camera/DCIM/100MSDCF \
-destination /data/photos/%YR/%YR%mmmR%dR-%HR%MmR%SsR%MSR.%EuP
copy /media/camera/DCIM/100MSDCF/DSC09877.JPG -> /data/photos/2026/20260615-095208422.JPG
copy /media/camera/DCIM/100MSDCF/DSC09878.JPG -> /data/photos/2026/20260615-095236463.JPG
Use -mtime -10 to process files that have a modification timestamp
that is 10 days or less from now:
$ pt -source /media/camera/DCIM/100MSDCF \
-destination /data/photos/%YR/%mmmR/%YR%mmmR%dR-%HR%MmR%SsR%MSR.%EuP \
-mtime -10
copy /media/camera/DCIM/100MSDCF/P1040737.JPG -> /data/photos/2026/08/20260815-091823078.JPG
copy /media/camera/DCIM/100MSDCF/P1040738.JPG -> /data/photos/2026/08/20260815-091912201.JPG