JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

test | JustPaste.app
about 2 months ago9 views
👨‍💻Programming

test

for f in *.{mp4,mkv,avi,mov}; do
  if [ -f "$f" ]; then
    # Remove the extension to get the folder name
    foldername="${f%.*}"
    mkdir -p "$foldername"
    mv "$f" "$foldername/"
    # Move any matching subtitle files too (e.g., .srt)
    mv "${foldername}".* "$foldername/" 2>/dev/null
  fi
done
← Back to timeline