#1 2010-11-24 22:17

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Inform if no files renamed

I had a few files with varying number of spaces in their names (not more than 3 or 4 max). Instead of writing a regex or something to replace all multiple spaces with a single space, I just used a replace rule to replace "  " (2 spaces) with " " (1 space), and ran that a few times in quick succession. That's when I realized that ReNamer always says "x file(s) successfully renamed", even when no renaming is actually done!

So when I had no more files with multiple spaces, ReNamer still kept saying it had renamed the files, when actually the file names were no longer changing. Even when I changed the rule to "  " (2 spaces) -> "?", which should have caused errors if the files were indeed renamed, it still said files successfully renamed.

My request is to detect when all new filenames are the same as the old ones (not always visually possible to check), and simply pop up a dialog saying, "There are no files to rename with the current options." or similar.

Offline

#2 2010-12-16 13:52

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Inform if no files renamed

Andrew, it is not difficult to do that, but it will be a performance hit. Every filename and the new name will have to be compared against each other, so when processing 1000's of files the performance hit may be very noticeable.

Maybe I can add this as an option, turned off by default...

For now, you can enable option "highlight changed names" which will highlight all of the names which are different.

Offline

#3 2010-12-16 22:30

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: Inform if no files renamed

I don't know if string comparison between every corresponding element pair in, say 2 arrays where the file names are stored (if that's what you use) will be really that slow. I just tried another mass renamer and added the root dir. of a drive with the recursive mode option on, so there were around 10K files. I didn't change anything, so the new filenames were exactly the same as the old ones. Pressed the rename button and almost immediately an info./warning dialog popped up saying that no files had been renamed. Maybe there's an even better way to do it rather than comparing each name pair one by one, but I don't know how that app. does it... In any case, I'd really like to see this, even if it a non-default option.

Offline

#4 2010-12-17 00:08

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: Inform if no files renamed

I don't know if this can be useful but sometimes I add this script at the end of some presets

begin
    If (FileName=WideExtractFileName(FilePath)) then FileName:='';
end.

For me it does the trick roll


If this software has helped you, consider getting your pro version. :)

Offline

#5 2010-12-17 16:28

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: Inform if no files renamed

Thanks SafetyCar, that's a decent workaround till the feature's implemented, though the validation does take some time if many thousands of files are added at one go.

Offline

#6 2017-10-14 15:01

Andrew
Senior Member
Registered: 2008-05-22
Posts: 542

Re: Inform if no files renamed

I see that an option to skip renaming of unchanged files was finally added in 6.6.0.6 Beta released on 2017-02-05. Took quite a long time but good to see yet another feature request finally implemented.

Offline

#7 2018-01-19 14:42

Cleoss
Member
Registered: 2018-01-19
Posts: 17

Re: Inform if no files renamed

It'd be good if a filelist not only does a highlight for all changed names with red color, but also can be sorted to group these 'red' files together imho. Or be able to filter out all 'black' unchanged names with a click on the row header.

Offline

#8 2018-01-23 19:17

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Inform if no files renamed

Cleoss wrote:

It'd be good if a filelist not only does a highlight for all changed names with red color, but also can be sorted to group these 'red' files together imho. Or be able to filter out all 'black' unchanged names with a click on the row header.

You can use right-click context menu to clear or mark only the changed or not changed files.

If you mark only the changed files, then you can also sort by the "State" column which takes the marking into the account.

Offline

Board footer

Powered by FluxBB