-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigratess
More file actions
executable file
·34 lines (23 loc) · 937 Bytes
/
Copy pathmigratess
File metadata and controls
executable file
·34 lines (23 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
INSTANCES_DIR="$HOME/.local/share/PrismLauncher/instances"
DEST_DIR="$HOME/Screenshots"
mkdir -p "$DEST_DIR"
count=0
echo "Scanning for screenshots in Prism Launcher instances..."
for instance_path in "$INSTANCES_DIR"/*; do
if [ -d "$instance_path" ]; then
instance_name=$(basename "$instance_path")
screenshot_dir="$instance_path/.minecraft/screenshots"
if [ -d "$screenshot_dir" ]; then
for file in "$screenshot_dir"/*; do
if [ -f "$file" ]; then
filename=$(basename "$file")
new_filename="${instance_name}_${filename}"
cp -n "$file" "$DEST_DIR/$new_filename"
((count++))
fi
done
fi
fi
done
echo "Aggregation complete! Copied $count screenshots to $DEST_DIR."