A script for renaming recording directories (regular -> "VFAT=1" format)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Esa Viitala wrote:
> Has anyone made a script to automatically go through video directory
> and rename all the recordings to format which is also produced when
> vdr is using VFAT "support"?

Try the attached one, should do the trick.

Cheers,

Udo

-------------- next part --------------
#!/bin/bash
for i in `find -type d -name "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].[0-9][0-9]:[0-9][0-9].[0-9][0-9].[0-9][0-9].rec"` ; do
    path=${i%/*}
    name=${i##*/}
    newname=${name/:/.}
    mv -iv "$path/$name" "$path/$newname"
done


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux