Skip to main content

Thread: Make folder names out of file names, move files


hello all,

i'm trying make script convert large library of movies folders. is, every video has info file, fanart pic, cover image, , video.

want make script that:

1. @ video's name, , make folder name, without extension

2. move videos, , support files, folder.

videos named [video name] ([year]).[ext] "avatar (2009).avi". support files jpg's, tbn's , nfo's

thanks!

you may have mess some, here's basic idea.

code:
for file in $(ls | grep avi)   
filename=$(echo $file | gawk '{ split($0,tmp,"."); print tmp[1] }')
mkdir tmp
mv $file $filename.jpg $filename.tbn $filename.nfo tmp
mv tmp $filename
done


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] Make folder names out of file names, move files


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support