You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
511 B
14 lines
511 B
#!/bin/bash
|
|
echo "PhotoRec Recovered Data - Source Folder?"
|
|
# Example - /home/user/rootfolderofphotorecdata
|
|
read sourcefolder
|
|
echo "Destination Folder?"
|
|
# Example - /home/user/rootfolderofphotorecdata/SORTED (will be made if doesn't exist)
|
|
read destinationfolder
|
|
cd $sourcefolder
|
|
mkdir $destinationfolder
|
|
for extensions in $(find . -type f -name '*.*' | sed 's|.*\.||' | sort -u)
|
|
do
|
|
mkdir $destinationfolder/$extensions
|
|
find $sourcefolder -name \*.$extensions -exec mv {} $destinationfolder/$extensions \;
|
|
done
|
|
|