#1 2014-02-01 12:33

elton
Member
Registered: 2009-10-17
Posts: 7

Problem with Renaming Folders and Skip Extension option

I am having problems with renaming folder and contents to get them in a preferred structure for a media server.

The folder is named after the movie title eg War.Of.The.Worlds and the files within the folder are similarly named eg War.Of.The.Worlds.mkv, War.Of.The.Worlds.nfo, War.Of.The.Worlds.xml etc

I have set up a Replace all "." with " " (skip extension) rule and for the most part it works but with one exception; it believes the last "." in the folder name is an extension! At least that is what I have come to think, but I have been known to be wrong!

So is there an option to ignore 'extensions' when renaming folders, or is there an alternative method of renaming folders?


Edit: I should add that within Filter Settings I have ticked Add folders as files.

Last edited by elton (2014-02-01 13:03)

Offline

#2 2014-02-01 14:48

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

Re: Problem with Renaming Folders and Skip Extension option

Currently the skip extension option affects both files and folders in the same way. To clean both file names and folder names with the standard rules you would need to do two separate runs, once for files (with skip extension option) and once for folders (without skip extension option).

The option of configuring this behavior has been on the wishlist for some time, I will bump up the priority for it.

In the meantime, you can use this Pascal Script below which will do what you want in a single rule. It will replace "." with " ", but will treat files and folders differently, skipping extension only for files.

begin
  if WideDirectoryExists(FilePath) then
    FileName := WideReplaceStr(FileName, '.', ' ')
  else
    FileName := WideReplaceStr(WideStripExtension(FileName), '.', ' ') +
      WideExtractFileExt(FileName);
end.

Offline

#3 2014-02-01 15:41

elton
Member
Registered: 2009-10-17
Posts: 7

Re: Problem with Renaming Folders and Skip Extension option

Thank you Dennis.

It's working a treat - have to be careful that the files are renamed first before the folder but what a time saver. Also the original folder name remains, but as an empty directory - so just a quick cleanup and I'm away to go.

big_smile Thanks again

Offline

#4 2014-02-12 23:36

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

Re: Problem with Renaming Folders and Skip Extension option

For the reference: Handling of extensions in folders is now optional (check in settings). Implemented in v5.74.5 Beta.

Offline

#5 2014-02-13 00:01

elton
Member
Registered: 2009-10-17
Posts: 7

Re: Problem with Renaming Folders and Skip Extension option

Thank you Dennis smile

Offline

#6 2014-05-06 17:44

alcestneige
Member
Registered: 2013-01-19
Posts: 28

Re: Problem with Renaming Folders and Skip Extension option

Is there a way to rename the original folder which contains some files without the fact that a new folder will be created and the original (but empty) folder will stay? It's of course not a problem to remove the empty folder, but if it could be done automatically in one step by ReNamer it would be better. Or is there a way to delete a empty folder by using ReNamer as a single action/new scan ??

@elton - for the time I'm using to delete empty folders this software from the context menu http://simonwai.com/developments/empty_folder_nuker/

Offline

#7 2014-05-06 21:51

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

Re: Problem with Renaming Folders and Skip Extension option

Currently there is no dedicated feature for removing empty folders after renaming.

Perhaps it is time to consider such a feature. I will add it to the list for consideration.

Offline

#8 2014-05-07 08:58

alcestneige
Member
Registered: 2013-01-19
Posts: 28

Re: Problem with Renaming Folders and Skip Extension option

In that case I would be more than delighted to pay for the pro version smile

Offline

Board footer

Powered by FluxBB