Hi guys,
I've got a question about Batch Conversion. I have a bunch of images I am converting using this feature, all in the same directory. It would be very nice if it were possible to preserve the original timestamps on the new files created. If that is not possible, it would be almost as good if there were some way to specify that the batch conversion so that it was done sequentially by the original timestamps. Then the new timestamps would be in the same temporal order as the original file timestamps.
Right now, PL seems to default to converting the images in alphabetical order. That leaves the converted images all jumbled up from the temporal order the original files had. There's probably some kind of workaround involving writing a script to invoke PL from the command line, but I'd like to avoid that if possible.
Batch Converting - timestamps
-
- Mitglied
- Posts: 109
- Joined: Sun 18 May 2003 02:02
Re: Batch Converting - timestamps
Just FYI - here's a script that does the timestamp match, in case someone else ever has the same problem when doing a Batch Conversion.
Code: Select all
#!/bin/bash
# Check if two arguments are provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <original_directory> <copy_directory>"
exit 1
fi
original_dir="$1"
copy_dir="$2"
# Check if the directories exist
if [ ! -d "$original_dir" ]; then
echo "Error: Directory '$original_dir' does not exist."
exit 1
fi
if [ ! -d "$copy_dir" ]; then
echo "Error: Directory '$copy_dir' does not exist."
exit 1
fi
# Loop through each file in the original directory
for file in "$original_dir"/*; do
# Extract the filename without the path
filename=$(basename "$file")
# Check if the file also exists in the copy directory
if [ -e "$copy_dir/$filename" ]; then
# Get the mtime timestamp of the file in the original directory
mtime=$(stat -c %Y "$file")
# Set the mtime timestamp of the corresponding file in the copy directory
touch -m -t $(date +"%Y%m%d%H%M.%S" -d "@$mtime") "$copy_dir/$filename"
echo "Updated timestamp of '$filename' in '$copy_dir' to match '$original_dir'."
else
echo "Warning: File '$filename' exists in '$original_dir' but not in '$copy_dir'. Skipping."
fi
done
echo "Timestamp synchronization complete."
-
- Entwickler
- Posts: 4184
- Joined: Mon 18 Nov 2002 15:30
- Location: Bad Gögging
Re: Batch Converting - timestamps
In PhotoLine 24.40b16 there is an option for this in the Batch Converting dialog.
-
- Mitglied
- Posts: 109
- Joined: Sun 18 May 2003 02:02
Re: Batch Converting - timestamps
Thank you, well done!