-
-
Save kageru/57160cfa7e1baa33f69bbe942b44b51b to your computer and use it in GitHub Desktop.
A simple script to move/rename a file/folder and change m3u playlist entries accordingly. Portmanteau of mv and m3u
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
#!/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