Folder Parts

<< Click to Display Table of Contents >>

Navigation:  Commands > Configure >

Folder Parts

The folder parts are used to configure the text generated for any folders selected, when you have unchecked the Same As Files check-box in the Folders To Text section of the configure dialog.

The following folder part types are the same as the file part types, so see the file part help for a description of those: Text, Name, Path, Date, Auto Number.

This page describes the two part types that are specific to folders.

Files

This generates text for each of the files in the folder currently being processed, using the rules from the Files To Text section.

EditPartFiles

The Files part type lets you set indent text, and any text you want added before or after the list of files from the folder.

The indent text is inserted before the text for each file is generated.

The Add to Start text is inserted before the text for all the files in the folder is generated, and the Add to End text is added after all the text generated for the files. However, note that if there are no files in the folder, then the Add to Start text and the Add to End text is not added.

Subfolders

This generates text for each of the sub-folders of the folder currently being processed.

Each sub-folder will be processed recursively using the same rules as for the current folder.

EditPartSubfolders

The Subfolders part type has the same options as the Files part type, and they work in a similar way.

The indent text is insert before all sub-folders and files that are processed for this part. Note that this means that if there are nested sub-folders, the indent text will be applied again for those, so the indent level increases the further down the folder hierarchy you go.

The Add to Start text is added before all the text generated for this part, and the Add to End text is added after, unless there are no sub-folders in the folder in which case they are not added. If you want text to be added even if there are no sub-folders, then you can just add Text parts around the Subfolders instead.

Example

To help clarify how the Files and Subfolders parts work, let's consider the case where a single folder has been selected in File Explorer, and the Simple Folder Listing command has been selected, which is one of the commands provided in the default list when CopyFilenames is first installed.

The screen-shots above are both taken when the Simple Folder Listing command was selected, so you can see the parts that are configured to generate the text for folders.

Since in this example, a single folder has been selected in File Explorer, the parts in the Folders to Text section are used to generate the text.

This is how the 5 parts work to generate the folder listing for the selected folder.

Text

The first part is a Text part, which starts the generated text with a newline and a quote character (").

Path

The second part is a Path part, which adds the full path to the selected folder to the generated text.

Text

The third part is a Text Part, which adds another quote character (") and newline to the generated text.

Files

The fourth part is a Files part, which generates text for all the files in the selected folder, using the rules from the Files to Text section.

Subfolders

The fifth part is a Subfolders part. This applies these same rules (from the Text to Folder section) to all the sub-folders in the selected folder.

This is the key to how all the sub-folders are processed, since the same rules are applied recursively each time more sub-folders are found.