You are not logged in.
Good evening! I don't know if this is the right section to post this, move it if needed. It was really bugging me that I had to extract each zip, rar, 7z etc manually so I made a script with Inotify, so know it extracts right after the download is finished. My question is now: Is there a command that checks the content of a .rar zip etc archive and then extracts it to a specific folder? If it is a videofile for example extract it in video folder? I'm not pro in shellscripting so please don't be too hard on me.
Offline
You could write a case based on the file extensions and move to a specific specific directory based on matches...
Moving to Programming & Scripting
Offline
Oh yes I never thought that way and a big facepalm on me of course this thread has to be in programming and scripting. But anyway I will try your suggestion.
Offline
Does each archive need to be kept together? Does each one only contain 1 type of file?
...if you're just wanting to unpack some "freely distributable media content" and put mp3s into one directory mp4 in another (etc), then a simple:
find /tmp/extracted -name '*mp3' -or -name '*flac' -exec mv '{}' /media/music \;
type command after your extract would work
Last edited by stevenhoneyman (2014-10-01 19:49:13)
My: [ GitHub | AUR Packages ]
Offline