topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday October 13, 2024, 2:12 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: Find filenames/folders above certain length and offer to rename them  (Read 108982 times)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
the look-n-feel is great so far, another addition could be the ability to add and retain user-defined character length in the drop-down. i think that's about it for gui, i couldn't think of anything else right now.

do continue with the renaming part and if it's not too much, can there be a log of old and new filename(s) whenever renaming occurs? btw, this log thing is totally optional.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
yes, i can see that trimming can cause certain files to have the same truncated file-names. it's a good idea that you are testing all possibilities before committing to the actual renaming. :up:

anything else, or should i work on converting it to a a functional app?

and would you like me to try and include any of the suggestions you made for Skwires response?

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
anything else, or should i work on converting it to a a functional app?

and would you like me to try and include any of the suggestions you made for Skwires response?

actually i don't know. :) i'm afraid that both scripts - your's and skwire's will end up as identical twins. it'd be nice if there was a different approach, maybe in addition to trimming some rules-based renaming suggestions could be added.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
actually i don't know. :) i'm afraid that both scripts - your's and skwire's will end up as identical twins. it'd be nice if there was a different approach, maybe in addition to trimming some rules-based renaming suggestions could be added.

haven't even looked at Skwires app - work impinges (how inconvenient...) - but it was inevitable that there would be similarities

predefined or rule based changes were suggested early in the piece, but how to decide which ones (so many choices, such a small gui...).  Make some suggestions...

I would like to finish this but if it's going nowhere there's not much point - while I enjoy the learning exercise and the opportunity to help out it's a waste if no ones going to use it.

Please give more feedback.  the more you give the better the final result will be...

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
yes, it'd better if there are some popular rules. i'd thought there'll be more participants giving suggestions for this type of tool. anyway, here are some of the ideas that i brought up earlier..

for repeated usage though, some rules to shorten filenames can be:
- replace given words with another
- remove whitespace, dots, underscore
- remove vowels
- truncate user-defined chars from left or right

item 4 is covered but item 2 can be used to change dots/underscore in the filename to whitespace or vice-versa. items 1 & 3 are not so useful. but you can add more characters to be removed like ` , ' # etc..

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
For the record, I'm really hesitant to develop this into a full-blown renamer.  One, there are PLENTY of much more capable renamer apps out there and, two, I simply don't want to have to support a renamer app.  Lanux, did you ever see Majkinetor's AHK-developed renamer app?  If not: Multi-Rename Script

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
egads Skwire, you sure know how to motivate a guy...

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
For the record, I'm really hesitant to develop this into a full-blown renamer.  One, there are PLENTY of much more capable renamer apps out there and, two, I simply don't want to have to support a renamer app.  Lanux, did you ever see Majkinetor's AHK-developed renamer app?  If not: Multi-Rename Script

skwire: i think you misunderstood me. my post was intended for Target as he was contemplating on how to improve his script while keeping it distinct from yours. maybe should have quoted Target in the reply, my bad..

anyway to reiterate, i've always maintained that i don't want a '"full-blown renamer", as can be seen from my earlier post.

i've been using 1-4a rename but it doesn't allow any user-defined character length, only 64 chars or more is detected as too long.. anyway, i'm not looking for full-blown renamer.

as mentioned above, just a simple app that will load given folders/files, checks against user-defined length and report back the status. additionally if it allows me to rename by pressing F2 within the GUI, i'd be most happy.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
egads Skwire, you sure know how to motivate a guy...
Beg pardon?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Updated: Name Knife

+ F2-based file renaming in is place.  Folder renaming is not.  The error checking is fairly comprehensive at this point.
+ Edit menu -> Length presets.  You can enter in your own list of length presets.
+ It will also save your last entered value.

Please let me know your thoughts.
« Last Edit: March 19, 2009, 08:38 AM by skwire »

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
egads Skwire, you sure know how to motivate a guy...
Beg pardon?

Majkinetor's a very capable AHK coder (I can only dream...), and seeing his app kind of makes my meagre efforts look, well, a bit sad...

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
+ F2-based file renaming in is place.  Folder renaming is not.  The error checking is fairly comprehensive at this point.
+ Edit menu -> Length presets.  You can enter in your own list of length presets.
+ It will also save your last entered value.

first two items works well but i don't get the 3rd item - "last entered value", did you mean the folder path?

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Majkinetor's a very capable AHK coder (I can only dream...), and seeing his app kind of makes my meagre efforts look, well, a bit sad...

if you're willing, i've another problem you can help me solve here. i'll post more info on the thread, do drop by.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
+ It will also save your last entered value.
first two items works well but i don't get the 3rd item - "last entered value", did you mean the folder path?
Apologies, I should have been more clear.  It should save the last custom length value you entered/used.  In regards to the folder paths, it will save the last ten (this is easily changed if ten is not enough).
« Last Edit: March 19, 2009, 09:21 PM by skwire »

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
an update -

  • added a 'folders only' checkbox - for limiting your add files actions to folders only...
  • all functionality now, umm, functional...
  • fixed hotkey (now back to F2 for editing a single entry)
  • blocked folder renaming when files are also added to the listview (as changing folder names would change file paths as well...)
  • added a replace field - this is something of an experiment.  Where the find field will accept comma separated strings, the replace field will only accept a single entry (be that a character or a string).  Net effect is that if there is an entry in the replace field ALL characters/strings in the find field will be replaced with that character/string (it will accept white spaces so you could easily get caught)

todo -
  • do something about the trim functionality to trap requests to trim more than the available number of characters in a file name

I have been doing a bit of testing but i would greatly appreciate it if you (or anyone else for that matter) could do some for me (the more the better!!)

and if you have any feedback, please let me know...

I saw the other thread, I'll have a think about it and see if I can come up with anything...

EDIT - removed old attachment
« Last Edit: March 23, 2009, 05:36 PM by Target »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Apologies, I should have been more clear.  It should save the last custom length value you entered/used.  In regards to the folder paths, it will save the last ten (this is easily changed if ten is not enough).

thanks, now i understand. also retention of ten folders is more than enough. :up:

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
new update -

changed the sort order which allows for folder renaming at the same time as files

EDIT - removed old attachment
« Last Edit: March 23, 2009, 05:36 PM by Target »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
new update -

changed the sort order which allows for folder renaming at the same time as files

have some suggestions though.. checking 'Folders only' option can be made auto-toggle instead of having to click 'refresh'. i haven't tried the 'trim' functions yet but the 'custom replace' sometimes renames a file without its extension, might want to check up on that.

additionally in the status bar, the 'files found' info can be broken up to:
(1) total numbers files/folders found and
(2) the numbers files/folders being viewed due to the filtering.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
OK, I'm pretty sure this has to be getting close...

I wasted a lot of time chasing a non existent bug (who knew '000' and '00' would evaluate to 0... :-[) - on the upside I found a couple of other errors that were masked by the (non-existent) bug

added a couple of extra's, a new name (Maim That File!), and a limitation (it will only load a single folder (and it's child files/folders) at any one time)

let me know if this works for you (actually, any feedback is good)

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Maim That File!
:Thmbsup:

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
I wondered if that would go past...

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
I wondered if that would go past...
Off topic, again.
I reckon you should have called it Crustes and introduced two versions.
Could have had Regular Crustes and Pro Crustes.


Anyway, to genuflect before the topic, you're doing a nice job on this!


Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
many thanks, I'm enjoying the excercise

and much as I enjoyed the reference, I'm not sure I want to produce something called crusties - that sort of thing that can follow you around (for years...)

contextually it's also a little confusing as the fellow was apparently either a minor deity (I'm somewhat used to this already) or a bandit.  It may be that there is sometimes little difference but I'd prefer the former rather than the latter

at the end of the day he came to a sticky end regardless which is also something I'd rather avoid if at all possible...

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
at the end of the day he came to a sticky end
...and so back to crusties.  I take your point.

Be nice if:
one could expand the window horizontally.  Believe it or not some file names here are longer than will fit without scrolling.
highlighting on selected files could be adjusted on the fly, to match the value in the trim left/right spinners.
there were a 'trim between'.
one could select/copy directly from file names to paste into the 'custom replace' box.
there were an undo.
the tax man knocked on my door tomorrow to hand me a full, cash refund
« Last Edit: March 23, 2009, 09:44 PM by cranioscopical »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Good work so far.  This is probably one scenario you want to handle:

Files named:

file_01.jpg
file_02.jpg
file_03.jpg
...

If you trim right two places, and keep overwriting, you will end up with a single "file_.jpg" file.