Created
February 24, 2020 13:12
-
-
Save kevinski303/6110d8b78b350962965bb1f603cae8a0 to your computer and use it in GitHub Desktop.
batchprocessing, moving multiple files into a subfolder from its filename (needed this to handle over 200 files)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in *.pdf; | |
do | |
echo "filename: $f"; | |
folder="$(echo $f | cut -f1 -d '.')"; | |
echo "creating folder $folder"; | |
mkdir $folder; | |
echo "moving file $f to folder $folder" | |
mv $f $folder; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment