You are not logged in.

#1 2011-01-07 21:20:33

whoops
Member
Registered: 2009-03-19
Posts: 891

Naming huge amounts of files after "undelete" / photorec / etc?

Hello!

Does someone already have a neat little script to automatically name a huge amount of files in multiple fuzzy sorts of ways? Like with id3-tags, exif tags, the first line / header of text documents of various formats... sort by file extension, mime-tag, file size if nothing else is there... and stuff? I'm only familiar with very few of the tools required and still failed miserably at getting them all together in a bash script.

If not: any hints on how to get started? I'm still missing a good way to deal with about everything except for images, mp3 & plain text...


Thx!

Offline

#2 2011-01-08 11:24:44

3])
Member
From: Netherlands
Registered: 2009-10-12
Posts: 215

Re: Naming huge amounts of files after "undelete" / photorec / etc?

On the AUR I found:

AUR/pyrenamer 0.6.0-4
    An application for the mass renaming of files


“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”-- C.A.R. Hoare

Offline

#3 2011-01-08 12:49:14

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: Naming huge amounts of files after "undelete" / photorec / etc?

Thanks! At a first glance though that thing doesn't look like what I'm searching for but more like just another gui that does some regex & "for loops" or whatever for you (and needs an awful lot of gnomes to do so). Do you know / recommend this program or is it just a random find?

Last edited by whoops (2011-01-08 12:49:44)

Offline

#4 2011-01-08 13:56:42

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: Naming huge amounts of files after "undelete" / photorec / etc?

To get the audio files out of the way,  you can use easytag (rename and sort mp3's into folders based on tags).

Offline

#5 2011-01-08 14:28:22

defears
Member
Registered: 2010-07-26
Posts: 218

Re: Naming huge amounts of files after "undelete" / photorec / etc?

I use gprename, with little dependancies. It's also in the regular repos.

Offline

#6 2011-01-08 19:05:18

silvik
Member
From: Bucharest/Romania
Registered: 2006-11-08
Posts: 110

Re: Naming huge amounts of files after "undelete" / photorec / etc?

krename has plugins for audio, exif and more, it's a very powerful little app.

Last edited by silvik (2011-01-08 19:06:54)

Offline

#7 2011-01-09 09:40:52

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: Naming huge amounts of files after "undelete" / photorec / etc?

I'm not sure if gprename does anything useful - if it does, I can't find it in the GUI.

easytag and krename are great, thanks! Just not fit for so many files and also I'd love if there was a way to do it without choosing pattern for everything manually (starting by the next time I need to do something like this wink).  Maybe I should have written that from the beginning: I have about 90M files... might not be a single occasion (people don't learn -.-") and it's not supposed to be perfect: more like a quick & dirty automatic way of making it a little easier for the "end-user" to find his files in this huge mess. I don't care (much) if the script runs for days as long as I don't have to interact with it though, if the result is worth it.

So far now, I managed to reduce the amount of files by about 99% with my script (duplicates, damaged files, very small files, files that have extensions or contain lines of text that indicate they belonged to some programs cache or something), have them sorted by file extensions and give names to word documents, mp3 that have an id3 tag and photos that have exif data available. Most problematic at the moment:
- Processing odt's at a reasonable speed. Extracting huge amounts to /tmp & grep/sed-ing stuff from the xml sucks (me too stoopid for awk hmm ).
- No idea how to get rid of all those files that were part of the windows installation or some other program. Especially huge amounts of videos that seem to have been part of tutorial / encyclopedia type of programs and help pages.
- I'd love to try & get some info from a p2p network. I understand despite it being not very clever, many many people share their whole harddisk, so If I figure out how to query with file hashes or something for "most common file name" and "amount of peers that share / want to download", I could get very far at removing more useless files and naming others.

Last edited by whoops (2011-01-09 09:45:57)

Offline

Board footer

Powered by FluxBB