Skip to content

Instantly share code, notes, and snippets.

@kevinski303
Created February 24, 2020 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinski303/6110d8b78b350962965bb1f603cae8a0 to your computer and use it in GitHub Desktop.
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)
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