Skip to content

Instantly share code, notes, and snippets.

@kageru

kageru/mv3u

Last active Feb 15, 2018
Embed
What would you like to do?
A simple script to move/rename a file/folder and change m3u playlist entries accordingly. Portmanteau of mv and m3u
#!/bin/bash
# Move/rename a file/folder and change all m3u playlists in $playlists accordingly
# Usage:
# $ mv3u old_filename "new filename"
# change this
playlists='/path/to/your/playlists'
src="$1"
dst="$2"
mv "$src" "$dst"
perl -p -i -e "s?\Q$src\E?$dst?" $playlists/*.m3u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.