Crop after 140 characters not working

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Crop after 140 characters not working

Postby kleach » Thu Oct 20, 2016 5:11 am

New to BRU, but was testing to see if I could rename files that were longer then 140 characters..
I got the filer(12) working but if I choose Crop "after" 140 or any number beyond 9 it will not display in new name nor let me click rename button.
I assume I am missing something stupid..
v 3.0.0.1

any ideas?

:edit
Yep stupid.. seems like From 140 to 999 will almost get me there.. not the crop after .. which uses a string match.. sorry..

bit it truncates the file extension.

How can I take a long filename an shrink it down AND keep the extension?
kleach
 
Posts: 4
Joined: Thu Oct 20, 2016 5:07 am

Re: Crop after 140 characters not working

Postby KenP » Thu Oct 20, 2016 11:36 am

To stop the file extensions being deleted, on the menu bar go to "Renaming Options - Ignore" and make sure File Extensions is not selected.

To be honest I didn't even think you could have 140 characters in a file name :)

As you already know you can choose

Remove (5)
From: 140
to: 999

edit: Originally I said you could also use Regex but it doesn't seem to save 140 characters for some reason :?
KenP
 
Posts: 199
Joined: Sat Jul 30, 2016 11:25 am

Re: Crop after 140 characters not working

Postby kleach » Thu Oct 20, 2016 12:06 pm

It does not seem to work.. it was already unchecked

If I select from/to of 140/999 and the filter name len min of 140 the rename ignore file ext. makes no difference.
My problem is most likely the same you are having.. filenames that long do not play nice with the windows API.
I need to copy whole dir trees to an encrypted drive which has a 146 limit.
I need to rename all files in a HUGE dir tree with more than 140 characters to 140 characters and be sure it is unique. BUT i have to keep the file ext.
It seems your tool has an error with this.,, can you verify?

-Ken
kleach
 
Posts: 4
Joined: Thu Oct 20, 2016 5:07 am

Re: Crop after 140 characters not working

Postby therube » Thu Oct 20, 2016 1:08 pm

For finding files, directories, or combinations thereof...

Everything 1.4.1 Beta

files or directory names >140 chars
> len:>140

only files, not directories
> len:>140 file:

combined file path+file name that exceed 259
> path:len>259
(259 is a kind of "magic" number after which many programs will fart)

filename length between 140 & 257 characters, but not audio or video files
> len:>139 len:<258 !video: !audio: file:
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby kleach » Thu Oct 20, 2016 1:28 pm

finding does not help fixing.
The BRU finds them fine.. just need to automate the smaller rename.. there are thousands ..
kleach
 
Posts: 4
Joined: Thu Oct 20, 2016 5:07 am

Re: Crop after 140 characters not working

Postby therube » Thu Oct 20, 2016 5:19 pm

finding does not help fixing

Right, I understand that, was just pointing out an easy way to find, that's all.


When I looked earlier, Win7, it seems like things were working as wanted.

Now, on XP, I'm having a hard time dragging long folders into BRU (as I"m running into, ESC key causes BRU to Exit) when I attempt to use:

12:Filters, & deselect Files, only enabling Folder


Anyhow, note that when attempting to truncate a directory name, it will only work if the name part that you're wanting to truncate is the last-most part of the pathname.

IOW:

E:\Documents and Settings\All Users\Application Data\Intuit\Common\Update Service\v4\Data\b011941567434707ab4d1928f5e81fdd\C\C-WinPerTaxSupport\015.000.0180_msp\v1\F

E:\Documents and Settings\All Users\Application Data\Intuit\Common\Update Service\v4\Data\b011941567434707ab4d1928f5e81fdd\C\C-WinPerTaxSupport\015.000.0180_msp\v1\N

Those paths are 164 characters, but the last-most part is simply an 'F' or an 'N', so an attempt to truncate anything past 140 will not do anything.

If you are expecting:

E:\Documents and Settings\All Users\Application Data\Intuit\Common\Update Service\v4\Data\b011941567434707ab4d1928f5e81fdd\C\C-WinPerTaxSupp

(140 characters) you can't do that, as BRU won't be able to change the directory structure (IOW truncate directories).

Now if you had a directory, (147 char):

C:\Local\SANDBOX\big-DefaultBox\user\current\Local Settings\Application Data\Totally_Random_Software\SiNet.exe_Url_jjndrayvqrfeo5o0ydbubd4uuqpliahh

Truncating past 140 would work, because the last-most part of the path runs from chars 102-147, so the truncate would cut the last 7 characters off, leaving you with a path length of 140 characters.

C:\Local\SANDBOX\big-DefaultBox\user\current\Local Settings\Application Data\Totally_Random_Software\SiNet.exe_Url_jjndrayvqrfeo5o0ydbubd4uu
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby therube » Thu Oct 20, 2016 5:42 pm

Actually there's something weird going on with:

5:Remove
From:
To:

and I'm not sure just what?
Much less if its going to be OS specific (XP at present)?

Like From: 140 To: 999 doesn't seem to be working?
Or if you start with From: 6 To: 18, while that might work, if you then go back & modify it to From: 6 To: 21, while that should be valid, & not sure just what is happening? Getting confused.

Thinking there is a bug in there?
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby therube » Thu Oct 20, 2016 5:46 pm

Also appears, but again not sure, that the "140" that you're dealing with, won't pertain to the entire path, even if the "last-most" I mentioned above is within that range, but rather only the actual length of "last-most", as displayed in the 'Length' column of the listing.

So your need to cut after 140, where the 'Length' shows as (is only, say) 72 will accomplish nothing.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby therube » Thu Oct 20, 2016 5:52 pm

What might work, is:

13:Copy/Move to Location
Path: C:\TMP\OUT


What that looks like it will do is to take that "last-most" ('Name' as shown in the 'File List') & copy/move that name (only, not the entire path+name structure) to your specified directory.

So:

C:\Local\SANDBOX\big-DefaultBox\user\current\Local Settings\Application Data\Totally_Random_Software\SiNet.exe_Url_jjndrayvqrfeo5o0ydbubd4uuqpliahh

becomes:

C:\TMP\OUT\SiNet.exe_Url_jjndrayvqrfeo5o0ydbubd4uuqpliahh


(I haven't experimented much with this, so test things out first...)
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby therube » Thu Oct 20, 2016 5:58 pm

Nope, something odd there too.

First attempt, I did a Copy, & that created the directory name in C:\TMP\OUT, & that is OK.

But then I looked & saw that there is actually a file in the source tree, but that was not copied?
(Expected, perhaps as BRU is not a "file copy" utility?)

So then I did it again, with Move rather then Copy, but I ended up with the same results, the new directory was again created in C:\TMP\OUT, though the old directory was left behind, as was the file with that directory, which again was not copied (moved actually) into the C:\TMP\OUT directory.


Perhaps it is because we're dealing with directories rather then files that (some of) these oddities are cropping up?
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby therube » Thu Oct 20, 2016 6:03 pm

lol (or cry), I NEED A REST.

So I reread the OP, & it is filenames not directories!
(I'll be back...)
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby therube » Thu Oct 20, 2016 6:17 pm

OK (cry)...

So I select 6 files where the filename (not path or anything like that, the name) length is > 140.
They range in length 194 to 245 characters long.

Drag them into BRU.

Then as Ken mentioned:

5:Remove
From: 140
To: 999 (actually seems the upper limit is 255)

With that, the 'Length' column shows the (new) lengths (will become, once renamed) 139 characters.

So it is truncating "From 140".

(Particular files didn't have extensions, but I'd expect the same assuming you have Renaming Options -> Ignore set correctly.)
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby kleach » Thu Oct 20, 2016 7:56 pm

I am on windows 2003 SP2
(trying to get off! to win 10)

as a point the dos rename command comes back with an error.. when trying to rename the full path and filename, or even if you are in the directory and trying to rename a very long filename.

The extensions get truncated no matter what I choose for an option to ignore on preview..
I can't easily move the files.. unless I can move them to a new subdir from where they live, dynamically..
kleach
 
Posts: 4
Joined: Thu Oct 20, 2016 5:07 am

Re: Crop after 140 characters not working

Postby therube » Fri Oct 21, 2016 2:13 am

(And again, just throwing it out here, Overcoming maximum file path length restrictions in Windows.)

(And I see the spammers are having a field day.)
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Crop after 140 characters not working

Postby Admin » Fri Oct 21, 2016 4:52 am

Sorry guys, big spam attack on forum, but it's fixed now! :(

Is there a bug in BRU we need to fix?

thanks!
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Next

Return to BRU Support


cron