Difference between revisions of "ReNamer:Renaming folders"

From den4b Wiki
Jump to navigation Jump to search
(added screenshots)
(Rewritten the basic instructions for renaming folders)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The process of renaming folders requires a little more attention as opposed to the process of renaming only files. Folders may require extra care because they are containers of items (other folders and files). Renaming a folder also affects all of its content.
+
{{Up|ReNamer}}
  
A problem can occur when users are trying to rename folders and their content in a single run. Items in the renaming list are processed from top to bottom, meaning that items at the top of the list will get renamed first and items at the bottom of the the list will get renamed last. The order of items in this case is extremely important for successful renaming.
+
== How to rename folders ==
  
'''Important:''' Parent folders must always appear below their contained items. This can be easily achieved by [[ReNamer:Sorting files|sorting items]] in descending order by Folder or Path column.
+
[[ReNamer]] has several [[ReNamer:Filter settings|filter options]] which configure how the added files and folders are treated.
  
Otherwise, you might end up trying to rename the parent folder first and then contained files and subfolders which will fail to rename because their paths would be changed after renaming their parent folder. Example: If you have "C:\Folder" folder and inside "C:\Folder\File" file, and you rename "C:\Folder" first, then "C:\Folder\File" will fail to rename because it will not be found, its path would be changed by a first renaming operation.
+
The default filter settings are configured for renaming files only, not the folders. When you add a folder, it will be scanned recursively and the contained files will be added to the renaming list.
  
'''Note:''' Remember to configure [[ReNamer:Menus_for_the_Files_pane#Filters_menu|filter settings]] to be able to add folders as items to the renaming list.
+
To rename the folders themselves, open [[ReNamer:Filter settings|filter settings]] and enable the "'''Add folders as files'''" option. If you are interested in renaming only folders and not the contained files, you also need to disable the "'''Add files within folders'''" option.
  
== Incorrect renaming ==
+
Note that if you add both folders and their content to the renaming list, you must take extra care to avoid potential [[#Conflicting order|conflicts in the renaming order]].
  
{| align="center"
+
== Extensions in folders ==
 +
 
 +
Note that [[ReNamer:Skip extension|Skip extension]] option may also affect folders. A setting "[[ReNamer:Program_settings#General_settings|Folders also have extensions]]" controls whether ReNamer treats extension in folder names the same way as in files. That is, if there are any periods in the name of a folder, the portion on the right side of the last period is treated as extension.
 +
 
 +
For example, if you had a list of tutorials organized in folders <code>01.Introduction</code>, <code>02.Basics</code>, <code>03.Advanced</code> and so on. If the "''Folders also have extensions''" option was enabled, <code>01</code>, <code>02</code> and <code>03</code> would be treated as base names, while <code>Introduction</code>, <code>Basics</code> and <code>Advanced</code> parts would be treated as their extensions, respectively.
 +
 
 +
== Conflicting order ==
 +
 
 +
Renaming a folder also affects all of its content. Therefore renaming of folders requires a little more care.
 +
 
 +
A problem can occur if you try to rename folders and their content in a single run. Items in the renaming list are processed from top to bottom. The order of items in this case is extremely important for successful renaming.
 +
 
 +
'''Important:''' Parent folders must always appear below their contained items. This can be easily achieved by [[ReNamer:Sorting files|sorting items]] in descending order by the '''Folder''' or '''Path''' column.
 +
 
 +
If a parent folder is renamed first, the actual path for its contents changes instantly, with its new name. However, the subfolders and files contained in that folder are still listed in ReNamer with their old path. As a result, ReNamer is unable to find those items at the specified location, and therefore it cannot rename them.
 +
 
 +
=== Example ===
 +
 
 +
Let's imagine that you have a folder <code>C:\Folder</code> which contains a file <code>C:\Folder\Document.txt</code>. You would like to rename both the folder and the contained file at the same time. You have listed the '''Folder''' before the '''Document.txt''' in ReNamer. As soon as the '''Folder''' is renamed to '''NewFolder''', the path for '''Document.txt''' changes to <code>C:\NewFolder\Document.txt</code> in the file system. However, the '''Document.txt''' is still listed in ReNamer at its original location <code>C:\Folder\Document.txt</code>. Thus ReNamer is unable to find '''Document.txt''' when it attempts to rename it.
 +
 
 +
In other words, while the contained folder is renamed, the contents are not.
 +
 
 +
=== Problem occurred ===
 +
 
 +
{|
 
! Preview
 
! Preview
 
! Rename
 
! Rename
Line 17: Line 41:
 
| [[Image:ReNamer Folder Rename Bad Before.png]]
 
| [[Image:ReNamer Folder Rename Bad Before.png]]
 
| [[Image:ReNamer Folder Rename Bad After.png]]
 
| [[Image:ReNamer Folder Rename Bad After.png]]
|-
 
|colspan="2" align="center"| Items as they appear after they were added, no sorting.
 
 
|}
 
|}
 +
Items as they appear after they were added, no sorting.
  
== Correct renaming ==
+
=== Problem solved ===
  
{| align="center"
+
{|  
 
! Preview
 
! Preview
 
! Rename
 
! Rename
Line 29: Line 52:
 
| [[Image:ReNamer Folder Rename Good Before.png]]
 
| [[Image:ReNamer Folder Rename Good Before.png]]
 
| [[Image:ReNamer Folder Rename Good After.png]]
 
| [[Image:ReNamer Folder Rename Good After.png]]
|-
 
|colspan="2" align="center"| Items after they were sorted in descending order by Folder column.
 
 
|}
 
|}
 +
Items after they were sorted in descending order by Folder column.
 +
[[Category:ReNamer]]

Latest revision as of 19:59, 16 May 2022

Arrow Return.png ReNamer  

How to rename folders

ReNamer has several filter options which configure how the added files and folders are treated.

The default filter settings are configured for renaming files only, not the folders. When you add a folder, it will be scanned recursively and the contained files will be added to the renaming list.

To rename the folders themselves, open filter settings and enable the "Add folders as files" option. If you are interested in renaming only folders and not the contained files, you also need to disable the "Add files within folders" option.

Note that if you add both folders and their content to the renaming list, you must take extra care to avoid potential conflicts in the renaming order.

Extensions in folders

Note that Skip extension option may also affect folders. A setting "Folders also have extensions" controls whether ReNamer treats extension in folder names the same way as in files. That is, if there are any periods in the name of a folder, the portion on the right side of the last period is treated as extension.

For example, if you had a list of tutorials organized in folders 01.Introduction, 02.Basics, 03.Advanced and so on. If the "Folders also have extensions" option was enabled, 01, 02 and 03 would be treated as base names, while Introduction, Basics and Advanced parts would be treated as their extensions, respectively.

Conflicting order

Renaming a folder also affects all of its content. Therefore renaming of folders requires a little more care.

A problem can occur if you try to rename folders and their content in a single run. Items in the renaming list are processed from top to bottom. The order of items in this case is extremely important for successful renaming.

Important: Parent folders must always appear below their contained items. This can be easily achieved by sorting items in descending order by the Folder or Path column.

If a parent folder is renamed first, the actual path for its contents changes instantly, with its new name. However, the subfolders and files contained in that folder are still listed in ReNamer with their old path. As a result, ReNamer is unable to find those items at the specified location, and therefore it cannot rename them.

Example

Let's imagine that you have a folder C:\Folder which contains a file C:\Folder\Document.txt. You would like to rename both the folder and the contained file at the same time. You have listed the Folder before the Document.txt in ReNamer. As soon as the Folder is renamed to NewFolder, the path for Document.txt changes to C:\NewFolder\Document.txt in the file system. However, the Document.txt is still listed in ReNamer at its original location C:\Folder\Document.txt. Thus ReNamer is unable to find Document.txt when it attempts to rename it.

In other words, while the contained folder is renamed, the contents are not.

Problem occurred

Preview Rename
ReNamer Folder Rename Bad Before.png ReNamer Folder Rename Bad After.png

Items as they appear after they were added, no sorting.

Problem solved

Preview Rename
ReNamer Folder Rename Good Before.png ReNamer Folder Rename Good After.png

Items after they were sorted in descending order by Folder column.