FilelistCreator

Script Control of the FilelistCreator

You want to create file lists using scripts or the command line? This is possible with the program FilelistCreator CL. In this tutorial, we will explain how it works. We will show you the first steps, the configuration options as well as all of the parameters you can use.

In the program's script control, all functions and options for creating a file list, which are also offered by the graphical user interface of the FilelistCreator, are available to you. Using these features, it is for example possible to integrate the FilelistCreator CL into scripts and to automate the creation of file lists.

The tutorial is divided into the following sections:

Basics of the Script Control of the Filelist Creator CL

Before we look at the individual functions and parameters in detail, we would first like to familiarize ourselves with the basics of the FilelistCreator CL script control with the help of the following example:

FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\FileList.xlsx

With this call we create a file list that contains all files from the folder "C:\Folder" and consists of the two columns "Name" and "File Size". We save that file list as an Excel document under the name "C:\FileList.xlsx".

Let's now look at each parameter in detail:

In the next sections we will explain these and other parameters in detail and with numerous examples. At the end of the tutorial you can also find an overview table with a brief description of all parameters including their default values, which are used if you do not set the respective parameter yourself.

As an alternative to the configuration of your file list using individual parameters, you can also configure your file list using the FilelistCreator's graphical user interface, save the configuration as a settings file and only pass the path to this settings file to the FilelistCreator CL:

FilelistCreator.exe -cl C:\Folder C:\Settings.fls save=C:\FileList.txt

In this example, we have saved the settings of the program under "C:\Settings.fls" and otherwise only transfer the files to be listed (here the contents of "C:\Folder") as well as the export file (here "C:\FileList.txt"). You can find out more about this type of configuration in the section about using settings files.

How to add Files and Folders to the File List

To add single or multiple files and folders to your file list, you can simply pass their paths to the program.

The next two calls demonstrate how you can add one or three individual files to a file list and save the list using the text format:

FilelistCreator.exe -cl C:\File.txt cols=name save=C:\FileList1.txt
FilelistCreator.exe -cl C:\File1.txt C:\File2.txt C:\File3.txt cols=name save=C:\FileList2.txt

Instead of adding individual files, you can also pass folders in the same way. This is shown in the next two example calls, in which we pass one respectively two folders to the program. The result is, that we get a list composed of the files that are stored in the passed folders:

FilelistCreator.exe -cl C:\Folder cols=name save=C:\FileList1.txt
FilelistCreator.exe -cl C:\Folder1 C:\Folder2 cols=name save=C:\FileList2.txt

Of course, we can also pass folders and files together. The following call creates a list of all files from the folder "C:\Folder" and the individual file "C:\File.pdf":

FilelistCreator.exe -cl C:\Folder C:\File.pdf cols=name save=C:\FileList.xlsx

When passing a folder path, the question arises whether only those files that are directly stored in the folder should be added or also the files that are stored in subfolders of the passed folder. This behavior can be controlled with the parameter "search-subdirs", which allows you to pass one of the two values "1" (yes) or "0" (no):

FilelistCreator.exe -cl C:\Folder search-subdirs=0 cols=name save=C:\FilelistWithoutSubfolders.txt
FilelistCreator.exe -cl C:\Folder search-subdirs=1 cols=name save=C:\FilelistWithSubfolders.txt

With both calls we want to create a list of the files from the folder "C:\Folder". In the first call, only the files that are located directly in the folder should be listed. Files from subfolders should not be listed. That's why we pass the parameter "search-subdirs=0". The situation is different with the second call. Here we pass "search-subdirs=1" and thereby also add all files from subfolders to our file list. If we omit the parameter "search-subdirs" (as in our previous examples), the default value is "1" - so by default, files from subfolders are always added.

File Lists and Folder Lists

In the GUI version of the FilelistCreator you can determine whether only files or also folders should be included as such in the file list by using the options under "Include". This is of course also possible in the CL version of the FilelistCreator and can be controlled with the parameters "add-files" and "add-folders", which can both take one of the two values "1" (yes) or "0" (no).

Accordingly, a pure folder list without any files listed can be created by passing one or more folders in combination with the parameters "add-files=0" and "add-folders=1", as the following example demonstrates:

FilelistCreator.exe -cl C:\Folder add-files=0 add-folders=1 cols=name,filecount_direct save=C:\FolderList.txt

This example provides us with a list of all folders that are located in the folder "C:\Folder" with the two columns "Name of the folder" as well as "Number of files in the respective folder".

If we want to list both, folders and files together, we have to set both parameters to "1" (yes):

FilelistCreator.exe -cl C:\Folder add-files=1 add-folders=1 cols=name,size save=C:\FolderAndFileList.txt

By default, that is if we do not specify any of the two parameters explicitly, the values "add-files=1" and "add-folders=0" are used. So, when a folder is passed, only the files it contains are listed, but not the folder itself. This corresponds to the following call:

FilelistCreator.exe -cl C:\Folder add-files=1 add-folders=0 cols=name save=C:\FileList.txt

So, if we would omit the parameters "add-files=1" and "add-folders=0" in this call, we would get the same result.

The settings whether files and/or folders should be included in the file list can also be configured via the FilelistCreator's graphical user interface and then passed via settings files to the program instead of using the "add-files" and "add-folders" parameters. You can find out how this works in the section about using settings files.

Filter for the File Extension and the File Type

In all of our examples so far, we have always added the entire content of a folder to our file list. However, there are many situations in which we only want to include certain files from a folder in our list without wanting or being able to list all of these files individually. In this case we can use the filter parameters of the FilelistCreator CL, as the next example shows:

FilelistCreator.exe -cl C:\Music filter-ext=mp3/flac cols=name,audio_duration save=C:\Music.csv

Here we want to create a list of our music collection. We pass the folder "C:\Music", which can also contain other files such as album covers or playlists. We don't want these files to be included in our list and therefore we pass the parameter "filter-ext=mp3/flac". With this parameter we can define one or more file extensions that our files for the list are allowed to have. With this call, we get a list of all MP3 and FLAC files from our folder. We save the list with the columns "name" (file name) and "audio_duration" (playing time) in CSV format under the name "C:\Music.csv".

If our music collection consists not only of MP3s and FLACs, but can also contain other formats such as WAV, WMA, M4A, AC3 or MKA, it can be complicated to list all of the file extensions individually. In this case, the filter for the file type "filter-type" will help us, which we can use as follows:

FilelistCreator.exe -cl C:\Music filter-type=audio cols=name,audio_duration save=C:\Music.csv

Using the parameter "filter-type=audio", we create a list of arbitrary audio files. Further parameters for the file type are "image", "video", "text", "document", "spreadsheet", "website", "font", "executable", "archive", "playlist", "sourcecode" and "other". Several types can also be combined with each other:

FilelistCreator.exe -cl C:\Media filter-type=audio,video,image cols=path save=C:\Media.csv

As an example, this call creates a list of all audio, video and image files from the folder "C:\Media" and saves the resulting list as C:\Media.csv.

Filter for the File Name

In addition to the file extension and the file type, whose filters we looked at in the last section, we can also filter the files by their name. This can be done with the paramater "filter-name", which we can use as shown in the next example:

FilelistCreator.exe -cl C:\Media filter-type=video filter-name=Bond cols=name,video_duration save=C:\JamesBondMovies.txt

With this call we want to create a file list of all videos from the folder "C:\Media" whose file name contains the text "Bond". To do this, we combine the two filters "filter-type=video" (only video files) and "filter-name=Bond" (only files that have the text "Bond" in the file name). We save the list in the TXT format under the name "C:\JamesBondMovies.txt".

The filter "filter-name" can be combined with the three parameters "filter-name-matchcase", "filter-name-matchall" as well as "filter-name-regex". We can use these additional parameters to determine whether the search text should be interpreted case-sensitive, whether the search term should match the file name completely respectively whether the search text should be interpreted as a regular expression. By default all of these three parameters are disabled. If you do not explicitly activate neither of these parameter, the search will be case-insensitive, will also match with file names only containing the search term and the search text will not be interpreted as a regular expression.

The following example demonstrates the use of "filter-name-matchcase". We want to create a list of all audio files (filter-type=audio) from the folder "C:\Media" that contain the text "Live" in the file name. However, we would like to prevent files from being found that have "live" in their name (for example as part of "Alive"). That's why we use the parameter "filter-name=Live" in combination with "filter-name-matchcase=1". As columns, we define the name as well as the genre of the audio file and save the file list as a text file under the name "GenreLiveRecordings.txt":

FilelistCreator.exe -cl C:\Media filter-type=audio filter-name=Live filter-name-matchcase=1 cols=name,audio_genre save=C:\GenreOfLiveRecordings.txt

The next example demonstrates the use of regular expressions. This time we want to create a list of images (filter-type=image) that contain a year between 2010 and 2019 in the file name. To do this, we use the regular expression 201[0-9], which matches any text that starts with 201 and ends with any digit. So that this text is interpreted as regular expression and the text is not searched for as such, we also pass "filter-name-regex=1". As columns, we define the name of the file as well as the creation date and save the file list as an HTML document under the name "Images2010-2019.html":

FilelistCreator.exe -cl C:\Media filter-type=image filter-name=201[0-9] filter-name-regex=1 cols=name,date_created save=C:\Images2010-2019.html

We would also like to look at an example for the third parameter “filter-name-matchall”. With the following call we list all text files whose names consist exclusively of numbers:

FilelistCreator.exe -cl C:\Texte filter-type=text filter-name=[0-9]+ filter-name-regex=1 filter-name-matchall=1 cols=name save=C:\NumFileNames.txt

For this we use the regular expression [0-9]+ (number of any length consisting of at least one digit from 0 to 9) in combination with filter-name-matchall=1. If we omitted filter-name-matchall=1 or wrote filter-name-matchall=0, files that - among other characters - only contain a number would also be found.

Of course, we can also use all three parameters together, for example to use case-sensitive regular expressions for a complete name search.

Multiple search terms can be listed separated with a slash. The following example creates a list of all files named either "abc" or "def".

FilelistCreator.exe -cl C:\Folder filter-name=abc/def filter-name-matchall=1 cols=name save=C:\List.txt

If we omitted the parameter "filter-name-matchall=1", all files whose names only contain either the text "abc" or the text "def" would also be listed.

The filter settings, regardless of whether they are the filters for the file extension, the file type or the file name, can also be configured via the graphical user interface of the FilelistCreator and then transferred via settings files instead of using the parameters presented here. You can find out how this works in the section about using settings files.

Columns and their Order

Next to the included files and folders, whose selection options we have looked at in the last sections, the second most important component of file lists consists of the column types of the table respectively list. As we have already seen in all previous examples, the desired columns can be defined using the parameter "cols".

We can see an example of this in the following call, with which we create a list of all files from the folder "C:\Music" and save it as "C:\MyMusic.xlsx" in the form of an Excel spreadsheet:

FilelistCreator.exe -cl C:\Music cols=audio_artist,audio_title,audio_album,audio_track,audio_duration,audio_year,audio_genre, path save=C:\MyMusic.xlsx

With the help of the cols parameter, here, we define the columns artist, title, album, track number, playing time, year, genre as well as the file path to the corresponding file in exactly this order for our list. The order of the columns therefore always complies exactly with the order in which the column parameters are defined in the parameter "cols". Apart from that, the parameters of the individual columns have to be listed separated by a comma.

All available parameters for the columns can be found in the overview table of all column parameters at the end of this tutorial. In the current version of the FilelistCreator CL, over 70 different columns are available that you can use in any combination and order for your file lists. There are over 10 column parameters available just for audio files. In addition to the columns from the example, the columns audio_discnumber, audio_comment, audio_samplerate, audio_bitrate as well as audio_channels are also available.

Sorting of the File List

In our previous examples, we haven't thought about the order in which the files and folders appear in our file list. We can control this using the "sort" parameter, with which we can define both a column to be sorted by as well as the direction of the sorting. We'll take a look at how this works in the next examples:

FilelistCreator.exe -cl C:\Folder cols=name,size,path sort=name save=C:\FileList1.xlsx
FilelistCreator.exe -cl C:\Folder cols=name,size,path sort=path-up save=C:\FileList2.xlsx
FilelistCreator.exe -cl C:\Folder cols=name,size,path sort=size-down save=C:\FileList3.xlsx

With all of these three calls we create a file list of the files from the folder "C:\Folder" with the three columns name, size and path. The difference between these three file lists lies in their sorting. The first list is sorted in ascending order by the column "Name", the second list is sorted in ascending order by the column "Path" and the third list is sorted in descending order by the file size.

The parameters "name", "path" and "size" come from the table "Column Parameters", in which you can find the respective parameter for each of the FilelistCreator's over 70 columns that you can use at this point. The desired sorting direction can be appended to the column parameter using "-up" (ascending) or "-down" (descending). If no direction parameter is defined, as in our first example, the default sorting is ascending. If the "sort" parameter is not defined at all, the files appear in the file list in the order in which they were added.

The column that is to be sorted by does not necessarily have to be included in the file list itself. An example of this is this call:

FilelistCreator.exe -cl C:\Folder cols=name,size,path sort=date_modified-down save=C:\FileList4.xlsx

Although our file list only contains the colums Name, Size and File Path, we sort in descending order by the files' last modification date. In the resulting list, the file that was edited last will appear at the top.

Furthermore, sorting according to format-specific columns is of course also possible, as the next three calls show:

FilelistCreator.exe -cl C:\Folder cols=name,video_duration sort=video_duration save=C:\FileList5.xlsx
FilelistCreator.exe -cl C:\Folder cols=name,text_wordcount sort=text_wordcount save=C:\FileList6.xlsx
FilelistCreator.exe -cl C:\Folder filter-ext=pdf cols=name,document_author sort=document_author save=C:\FileList7.xlsx

The first call sorts the video files in the file list according to their playing time, the second call sorts the text files according to the number of words they contain and the third call limits the file list to PDF documents using the file extension filter and sorts them according to their author.

Storage Format of the File List

If you do not specify any other configurations, the format in which the file list is saved is determined by the file extension of the file for saving the file list. As we've seen in all examples so far in this tutorial, this export file is set using the save parameter. So, for example:

FilelistCreator.exe -cl C:\Folder cols=name,date_created,size,path save=C:\FileList.txt
FilelistCreator.exe -cl C:\Folder cols=name,date_created,size,path save=C:\FileList.csv
FilelistCreator.exe -cl C:\Folder cols=name,date_created,size,path save=C:\FileList.xlsx
FilelistCreator.exe -cl C:\Folder cols=name,date_created,size,path save=C:\FileList.ods
FilelistCreator.exe -cl C:\Folder cols=name,date_created,size,path save=C:\FileList.html
FilelistCreator.exe -cl C:\Folder cols=name,date_created,size,path save=C:\FileList.png

Each of these six calls creates a file list of the files in the folder "C:\Folder" with four columns: name, creation date, file size and file path. However, we have defined six different export formats by using different file extensions with the "save" parameter. The first call saves the file list as a simple text file (TXT), the second call as Comma-Separated Values (CSV), the third as an Excel spreadsheet (XLSX), the fourth as an Open Document Spreadsheet (ODS), the fifth as HTML website and the last one as an image in PNG format. The formats and file extensions txt, csv, xlsx, ods, dif, htm, html, bmp, png, gif, jpg and jpeg are supported.

Alternatively, if the format is not apparent from the file extension, you can specify the format using the "format" parameter, which also accepts the values txt, csv, xlsx, ods, dif, htm, html, bmp, png, gif, jpg and jpeg:

FilelistCreator.exe -cl C:\Folder cols=name,size format=csv save=C:\FileList.dat

Here we want to save our file list under the name “C:\FileList.dat”. However, the file extension "DAT" does not reflect a clear format, so we have specified our desired storage format using the parameter "format=csv". So, we get a CSV file with the extension DAT.

We can also use the format parameter to force a specific storage format regardless of the file extension. An example would be the following call, which forces the export file to use the "CSV" format despite the "TXT" file extension:

FilelistCreator.exe -cl C:\Folder cols=name,size format=csv save=C:\FileList.txt

Accordingly, for this call we receive a CSV file with the file extension TXT. Without "format=csv" this call would result in saving as a text file.

When saving the file list in a text format such as TXT, CSV or HTML, you can additionally add the parameters "enc", "bom", "lb" and "fs" to influence the encoding, the byte order mark (BOM) and the line break type as well as the field separator used for the file. By default, that is, if you do not explicitly define any of these three parameters, it is saved as UTF-8 without BOM and the system line break type (CRLF for Windows) is used. As field separator for CSV files, depending on the system settings, the comma or the semicolon is used by default. These default values can be overwritten as required using the four parameters:

FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\FileList.txt bom=1
FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\FileList.txt lb=lf
FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\FileList.txt enc=utf16le bom=1
FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\FileList.csv lb=crlf fs=tab

The first call saves the file list as UTF-8 with BOM and the system line break (only the BOM parameter is set, ENC and LB remain at their default values). The second call saves the file list as UTF-8 without BOM (the default values) with the line break type LF (Linux, macOS). The third call saves the file list in the encoding UTF-16 Little Endian with BOM and using the system line break (the default value). The last call saves the file list as a CSV file with a tab as field separator (fs=tab) and a CRLF line break as line delimiter (lb=crlf).

An overview of all usable parameters for the different encodings and line break types can be found in the parameter overview table under "enc" and "lb". The "bom" parameter accepts the values "1" (yes) or "0" (no).

If you omit the "save" parameter and do not define an export file, the file list is output directly to the console. You can learn more about this in the section about outputting file lists to the console.

How to write Date and Time into the File Name of the File List

When automating the creation of file lists via scripts, it can be useful to use a dynamic file name, for example by always writing the current date and/or time into the file name. Otherwise, when runnning the script continuously with using a static file name, it can result in overwriting the last file list with each new list creation. If this is not desired, inserting the current date, possibly in combination with the current time, makes it possible to always get a unique file name.

For this purpose, the FilelistCreator provides you with some placeholders for the current date and the current time, which you can insert into the file name like you want and in combination with any other characters. You can find an overview table of all available placeholders at the end of this tutorial under the heading Placeholders for the File Name.

The current date can be inserted using the placeholder %date%:

FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\FileList_%%date%%.xlsx

The placeholder %time% gives us the current time:

FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\FileList_%%date%%_%%time%%.xlsx

We have to double the character % in the script calls so that the placeholders are not interpreted as variables.

The placeholder %date% provides us with the current date in the format year-month-day with leading zeros for month and day (for single-digit months or days). %time% gives us the current time in the format hour-minute, also with leading zeros. If you would like to use a different formatting, combination or order of the individual date and time components, you will find enough other placeholders for every situation in the overview table. You can see two more examples of this here:

FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\%%yyyy%%-%%mm%%.xlsx
FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\%%date%%-%%hh-mm-ss%%.xlsx

The first of these two calls, for example, writes the date in the form "year-month" and omits the day; the second call outputs the time including the seconds (instead of without seconds with %time%).

Of course, the placeholders for the date and the time can be used not only in the file name but also in the file path. An example of this is the following call of the FilelistCreator:

FilelistCreator.exe -cl C:\Folder cols=name,size save=C:\%%yyyy%%\%%mm%%\%dd%_%%time%%.xlsx

With this call we create a folder for the current year and in this another folder for the current month. In the month folder we finally save the file list with a name that includes the day and the time of storage. With repeated calls of this type over years, we get our file lists neatly sorted by year and month in the folder structure mentioned.

How to write List Properties into the File Name of the File List

In addition to the placeholders for the current date and the current time, the FilelistCreator comes with some other placeholders that you can use to include properties of your file list in the file name. This group of placeholders, which you can also find in the overview table of all placeholders for the file name, includes placeholders for the number of files in the list, the total playing time of all listed audio and video files as well as placeholders for the number of all lines, characters and words of text files. In the next few examples we want to look at all of these placeholders.

In our first example, we want to present the placeholders for the total number of files in the list (%total_files%) as well as the total file size of all files in the list (%total_size%):

FilelistCreator.exe -cl C:\Folder cols=name,size "save=C:\FileList with %%total_files%% Files (%%total_size%%).xlsx"

A possible file name that could be generated by this call could be "File List with 100 Files (20 MB).xlsx".

With the next call we want to create a list of our video files (filter-type=video). In addition to the file name (column "name"), we write the playing time of the individual videos into the second column of our file list (column "video_duration"). In the file name we are using the placeholders %total_files% and %total_duration% to include the total number of videos and the total playing time of all videos in the list into the file name:

FilelistCreator.exe -cl C:\Folder filter-type=video cols=name,video_duration "save=C:\My Videos (%%total_files%% Files, %%total_duration%% Duration).xlsx"

Finally, we would also like to take a look at an example of the placeholders for the total number of lines, characters and words of text files:

FilelistCreator.exe -cl C:\Folder filter-ext=txt cols=name,text_linecount,text_charcount,text_wordcount,text_firstchars "save=C:\My Test Files (%%total_files%% Files, %%total_lines%% Lines, %%total_chars%% Characters, %%total_words%% Words).xlsx"

This call creates a list of all text files with the file extension "TXT" (filter-ext=txt) from the folder "C:\Folder" and lists the name as well as the number of lines, characters, words and the first characters for each individual file. Additionally, we write the total number of files, lines, characters and words into the file name using the parameters %total_files%, %total_lines%, %total_chars% and %total_words%.

How to open the File List after creating

Whether a file list created via a script call of the FilelistCreator CL will be opened automatically immediately after saving or not can be specified using the parameter "openfile". An example of using "openfile" is the following call of the program:

FilelistCreator.exe -cl C:\Folder cols=path,checksum_md5 save=C:\MD5.csv openfile=1

With this call we create a list of the paths and MD5 checksums of all files from the folder "C:\Folder", we save the list as "C:\MD5.csv" and open the file automatically immediately after its creation via the standard program for CSV files deposited in the operating system.

Passing the parameter “openfile=1” ensures that the file will be opened. By default, that is if we do not explicitly specify the parameter "openfile=1", the file list will not be opened. This corresponds to passing the parameter "openfile=0".

Output of the File List in the Console

In all of our previous examples, we have always saved our file list as a file using the save parameter. Alternatively, we can also output the file list directly to the console. The only thing we need to change on our calls is to omit the save parameter that defines the export file:

FilelistCreator.exe -cl C:\Folder filter-ext=txt cols=path,text_encoding,text_linebreaktype

This call provides us with an overview of the encoding and the line break type of all text files with the file extension "TXT" from the folder "C:\Folder" directly to the console.

By default, the file list is output in text format into the console. However, we can override this format using the format parameter, which we have already learned about in the section on saving the file list as a file. An example for using this parameter for the console output is the following call, in which we print the encoding as well as the presence of a byte order mark in text files within the console using the CSV format by passing the parameter "format=csv":

FilelistCreator.exe -cl C:\Folder filter-ext=txt cols=path,text_encoding,text_bom format=csv

In console mode, currently, only the formats txt, csv, dif, htm and html are supported. The other formats such as images (BMP, PNG, GIF and JPG) or spreadsheet formats like XLSX and ODS are currently only supported as export formats in the form of files.

Usage of Settings Files

In the previous examples of this tutorial, we have always passed all the configurations for our file list, such as our desired columns for the list or the filters for the file type, the file extension or the file name, to the FilelistCreator CL using individual parameters. However, there is another way that we want to discover in this section:

Instead of using the individual parameters, we can simply open the FilelistCreator, make our desired configuration conveniently via the graphical user interface, save our settings via the menu "Settings > Save > Save as File" in order to then just pass the resulting settings file to the program. FilelistCreator settings files have the file extension FLS (File List Settings) and can be used in the script call as follows:

FilelistCreator.exe -cl C:\Folder C:\Settings.fls save=C:\FileList.xlsx

In this call, we only specify our desired files for the list (here the content of the folder "C:\Folder") as well as the export file in which we want to save the file list (here "C:\FileList.xlsx"). The rest is in the settings file "C:\Settings.fls", which we simply pass as such. This file can contain all of the FilelistCreator's configuration options, such as the desired columns, the desired file filters or the desired encoding for text files, without us having to explicitly pass parameters for those settings.

Settings files can also be used for configurations that currently do not have their own parameter. This concerns, for example, the column headings, the column alignment or formatting settings of individual columns. Without settings files, for these configurations always the default values would be used.

By the way, using settings files does not mean that you have to go without the other parameters presented in this tutorial. Rather, settings files can also be easily combined with other parameters, as the next example shows:

FilelistCreator.exe -cl C:\Folder C:\Settings.fls cols=name,date_accessed save=C:\FileList.txt

In addition to the settings file "C:\Settings.fls" we pass the parameter "cols=name,date_accessed" with which we define our desired columns. This parameter overrides the column configuration from the settings file. With this call, the column headings as well as all other configurations would be taken from the settings file - however, regardless of which columns are stored in the settings file, only the columns defined with the "cols" parameter would be included in the file list. You can learn more about this topic in the next section about the combined application of settings files and parameters.

If you open a settings file of the FilelistCreator in a text editor, you will see that a settings file also contains a lot of information not needed for script control. These include, for example, settings for the graphical user interface such as the size and position of the program window. These entries are simply ignored in the program's batch mode and do not need to be removed by you for use in a script call. However, there may be situations in which editing settings files makes sense. For example, you can create settings files that contain only individual configurations and then combine them with other settings files or parameters. This combination of multiple settings files can be more effective than creating a single settings file for each configuration. If you want to pass multiple settings files to the FilelistCreator, you can simply pass them one after the other as individual parameters. The files are then loaded one after the other and, if necessary, overwrite the values from the previous settings file or files.

Combined Application of Settings Files and Parameters

The last section explained how we can pass the configuration for our file list via settings files instead of parameters. Concurrently, it has already been indicated that this does not mean that we have to completely forego our parameters. Rather, we can also use settings files and parameters together, it is even possible to pass multiple settings files at the same time.

Since such a scenario can lead to conflicting configurations, for example if different columns for the file list are defined via the parameters than via a settings file passed at the same time, in this section we would like to discuss what happens in such a case and which configurations are given priority for the creation of our file list. To do this, it is necessary to understand the internal process of the program, which we would like to take a look at hereinafter.

When processing the parameters, the FilelistCreator CL proceeds as follows:

In summary, first, all passed settings files are loaded one after the other. Then, all passed parameters are loaded one after the other. With each loading process, the previous settings are overwritten if different values are specified.

Overview of all available Parameters

In the following table we have listed all the parameters that you can use in the batch mode of the FilelistCreator CL. In the first column you will find the name of the parameter. The next column contains a list of all possible values that the respective parameter can take. The third column shows the default value that is used if the respective parameter is not explicitly specified. Additionally, in the last column, you can find a short description of the parameter, which also links to sections of this tutorial in which the parameter is explained in detail and with examples.

ParameterValuesDefaultDescription
[Folders]arbitrary folder path(s)-Path to one or more folders to be added to the file list. Multiple folders can be specified in a row to add more than one folder at the same time. You can use the parameters add-files and add-folders to determine whether the files from the folder and/or the folder itself is added to the file list. To avoid adding all files from the folder to your file list, you can use the parameters search-subdirs, filter-ext, filter-name, filter-name-matchcase, filter-name-matchall, filter-name-regex as well as filter-hiddenfiles, filter-onlytextfiles and filter-onlybinaryfiles to narrow down the file search. For more information and examples, see the section about adding folders.
[Files]arbitrary file path(s)-Path to one or more files to be added to the file list. Multiple files can be specified in a row to add more than one file at the same time. More information and examples in the section about adding files.
[FLS-Files]settings files with the file extension *.fls-Path to a settings file with the file extension FLS (File List Creator Settings), which can contain all FilelistCreator settings such as column configurations or storage options. Settings files can be created via the graphical user interface of the FilelistCreator and can be combined and overwritten with all other parameters. Multiple settings files can be specified consecutively, which are then loaded one after the other. More on using and creating settings files in the section about using settings files.
cols<column1>,<column2>,...-Columns and their order for the file list. The columns can be specified one after the other, separated by commas using their column parameters. Example: cols=name,date_created,size (first column: file name, second column: creation date, third column: file size). For a detailed explanation and examples, see the section about columns and their order.
sort<column>-up or <column>-down-Column by which the files in the file list should be sorted. The column can be specified via their column parameter. Optionally, "-up" and "-down" can be appended, depending on whether you want to sort in ascending or descending order. If neither "-up" nor "-down" is appended, the default sorting is ascending. Examples: "sort=name" (ascending sorting by name), "sort=size-down" (descending sorting by file size) or "sort=audio_duration-up" (ascending sorting by the playing time of audio files). For a detailed explanation and examples, see the section about file list sorting.
savepath to an arbitrary file-File as which the file list is saved. The export format results from the file extension (supported formats/file extensions are: txt, csv, xlsx, ods, dif, htm, html, bmp, png, gif, jpg and jpeg) or can be specified respectively overwritten by the parameter "format". Placeholders for the current date, the current time or list properties can be used in the file name. If the save parameter is not specified, the file list is output directly to the console. For examples and more information about the save parameter, see the section about the storage format of the file list.
formattxt, csv, xlsx, ods, dif, htm, html, bmp, png, gif, jpg or jpegtxtExport format of the file list. When outputting the file list directly to the console, this parameter can be used to specify the output format. For console output, only text formats such as TXT, CSV, DIF, HTM and HTML are currently supported. Document, spreadsheet or image formats are not supported for console output. When saving the file list as a file, the format typically results from the file extension of the specified export file, so that the explicit specification of the format parameter is only necessary if the desired export format is not emerging from the file extension. Examples for this case are "save=liste.dat format=csv" or "save=liste.txt format=html". Examples and more information about this parameter can be found in the section about the storage format of the file list.
filter-extarbitrary text- If you only want files with a specific extension to be added to the file list, you can specify the relevant extensions with this parameter. For example, filter-ext=mp4 to only add videos with the file extension MP4. Multiple endings can be separated with a slash (/). For example, filter-ext=avi/webm/mp4 to only consider files with the file extensions AVI, WEBM or MP4. If you leave this parameter omitted or blank, files with all extensions will be accepted. For detailed explanations and examples, see the section about file extension and file type filters.
filter-typeimage, audio, video, text, document, spreadsheet, website, font, executable, archive, playlist, sourcecode, other or allallIf you only want to add files of a specific file type or category to the file list, you can define these types using this parameter. For example, with filter-type=archive you only list files like ZIP, RAR or 7Z. Multiple types can be separated with a semicolon (;), a comma (,) or a hyphen (-). With "filter-type=audio;video", for example, the file search can be limited to audio and video files. Accordingly, this filter would only add files like MP3, MP4, WAV, WMA, WMV, MPG or AVI to your file list. If you omit this parameter or if you use it with "all", files of any file type are accepted. For detailed explanations and examples, see the section about file extension and file type filters.
filter-namearbitrary text-If you only want files with a specific name to be listed, you can specify that name with this parameter. All files containing the characters specified with "filter-name" in their names are listed. With "filter-name=ab", for example, files like abc.pdf or xab.docx. Multiple search terms can be defined separated by a slash (for example filter-name=abc/def to find all files whose names contain either "abc" or "def"). If you omit this parameter or leave it blank, files with all names are included. This parameter can be combined with the parameters filter-name-matchcase, filter-name-matchall and filter-name-regex. For detailed explanations and examples of using this parameter, see the section about the file name filter.
filter-name-matchcase0 or 10Should the text or regular expression specified with the parameter "filter-name" be interpreted case sensitive, according to its upper and lower case writing? 0 for no, 1 for yes. If set to 1, the text/regex in the file name must appear exactly in the same writing like specified. If 0, the search is carried out regardless of upper and lower case writing.
filter-name-matchall0 or 10Should the text or regular expression specified with the parameter "filter-name" match the entire file name? 0 for no, 1 for yes. If 1, the entire file name must fully correspond to the search term. If 0, it is sufficient if the search term only appears somewhere in the file name.
filter-name-regex0 or 10If you want the search filter specified with "filter-name" to be interpreted as a regular expression, use 1. If you just want to search for the specified text, use 0.
filter-hiddenfiles0 or 10Should hidden files also be found when searching folders? 0 for no, 1 for yes. A value of 0 will not add hidden files to your file list; a value of 1 will also list hidden files.
filter-onlytextfiles0 or 10Should only text files be found when searching folders? 0 for no, 1 for yes. If yes, each file is checked before adding to see if it is a binary file and the file is only added to the file list if the file is not a binary file.
filter-onlybinaryfiles0 or 10Should only binary files be found when searching folders? 0 for no, 1 for yes. If yes, each file is checked before adding to see if it is a binary file and the file is only added to the file list if this is the case.
search-subdirs0 or 11 Should subfolders also be included when searching folders? 0 for no, 1 for yes. A value of 0 will only add files to your file list that are located directly in the specified folder (subfolders are not searched). A value of 1 lists both the files that are located directly in the folder as well as all the files that are stored in a subfolder below the specified folder. For examples and further explanation of this parameter, see the section about adding files and folders to the file list.
add-files0 or 11Should files be added to the file list? 0 for no, 1 for yes. For explanations and examples of this parameter, see the section about generating file lists and folder lists.
add-folders0 or 10Should folders be added to the file list as such? 0 for no, 1 for yes. If you want to create a pure folder list without listed files, you can use a combination of the parameters "add-folders=1" and "add-files=0". For explanations and examples of this parameter, see the section about generating file lists and folder lists.
encascii, latin1, latin2, win-ansi, win-1250, win-1251, win-1252, win-1253, cp437, utf7, utf8, utf16le, utf16be, utf32le or utf32beutf8Encoding for the stored file list if saved in a text format such as TXT, CSV or HTML. The "win-ansi" encoding depends on the localization of your Windows version. The Windows code page that corresponds to your language version of Windows is used when taking this parameter. You can find an overview and explanations of the different encodings in the article about the different text file formats and encodings. For more information about this parameter and examples of its use, see the section about file list storage.
bom0 or 10Should a byte order mark be written into the file when saving in a text file format such as TXT, CSV or HTML? 0 for no, 1 for yes. For more information about this parameter and examples of its use, see the section about file list storage.
lbsystem, crlf, lf, cr, nl, ff, nel, ls, ps, vt, tab or nocharsystemLine break type for the file list file for the case that the list is saved in a text file format such as TXT, CSV, or HTML. The value "system" corresponds to the default line break type of the operating system on which the FilelistCreator CL is currently running. So. for example, crlf for Windows. The constant "nochar" represents no character. You can use "nochar" to create a list without newline characters. For more information about this parameter and examples of its use, see the section about file list storage.
fssystem, comma, semicolon, pipe, hyphen, space, tab, nochar or any arbitrary StringsystemField separator character(s) for the CSV export. The value "system" corresponds to the standard field separator of the operating system, on which the File List Creator CL is currently executed (comma or semicolon). The constant "nochar" stands for no character. For more information about this parameter and examples of its use, see the section about file list storage.
openfile0 or 10Should the file list be opened after creation? With openfile=1 the newly created file is opened. Examples in the section about automatically opening file lists.

In general, all of the listed parameters can be combined with each other and used together within the same call of the FilelistCreator CL. The order in which you pass the individual parameters does not matter. You can find out how the various parameters interact with each other - especially in the event that individual parameters contradict each other - in the section about the combined use of parameters and settings files.

If the FilelistCreator CL is called without defining a specific parameter, the value from the column "Default" is assumed for this parameter. If the value "-" is specified in the column "Default", this means that the parameter in question is empty by default.

Overview of the Column Parameters

The following table lists all available parameters for columns. You need these parameters for both, the "cols" parameter, which allows you to specify which columns should be included in your file list, as well as for the "sort" parameter, which allows you to specify which column your file list should be sorted by.

The column parameters are sorted by their category, which you can find in the first column. The name respectively an explanation of the corresponding column is presented in the second column, while the parameter itself is listed in the last column.

CategoryColumnParameter
GeneralFile Number in Listnumber
GeneralFile Namename
GeneralFile Formatformat
GeneralFile Typetype
GeneralFile Sizesize
GeneralFile Pathpath
GeneralPath Lengthpath_length
File DateLast Modification Datedate_modified
File DateCreation Datedate_created
File DateLast Access Datedate_accessed
File DateDate of Last Attribute Changedate_attrchanged
FolderFolder Namefolder
FolderFolder Levelfolder_level
FolderNumber of Files (all)filecount_all
FolderNumber of Files (first Level)filecount_direct
FolderNumber of Folders (all)foldercount_all
FolderNumber of Folders (first Level)foldercount_direct
FolderFolder Size (first Level)foldersize_direct
FolderFolder Deepnessfolder_deepness
Data MediumVolumne Namevolume_name
AudioArtistaudio_artist
AudioTitleaudio_title
AudioAlbumaudio_album
AudioTrack Numberaudio_track
AudioDisc Numberaudio_discnumber
AudioDurationaudio_duration
AudioYearaudio_year
AudioGenreaudio_genre
AudioCommentaudio_comment
AudioSample Rateaudio_samplerate
AudioBit Rateaudio_bitrate
AudioChannelsaudio_channels
VideoWidthvideo_width
VideoHeightvideo_height
VideoAspect Ratiovideo_aspectratio
VideoDurationvideo_duration
VideoBit Ratevideo_bitrate
VideoFrames per Second (FPS)video_fps
ImagesWidthimage_width
ImagesHeightimage_height
ImagesAspect Ratioimage_aspectratio
ImagesColor Depthimage_colordepth
ImagesColor Spaceimage_colorspace
ImagesHorizontal Resolutionimage_resx
ImagesVertical Resolutionimage_resy
ImagesNumber of Imagesimage_imagecount
Text FilesEncodingtext_encoding
Text FilesByte Order Mark (BOM)text_bom
Text FilesLine Break Typetext_linebreaktype
Text FilesNumber of Linestext_linecount
Text FilesNumber of Characterstext_charcount
Text FilesNumber of Wordstext_wordcount
Text FilesFirst Characters of Filetext_firstchars
DocumentsAuthordocument_author
DocumentsTitledocument_title
DocumentsNumber of Pagesdocument_pagecount
CombinationsWidth of Images or Videoscombined_width
CombinationsHeight of Images or Videoscombined_height
CombinationsAspect Ratio of Images or Videoscombined_aspectratio
CombinationsDuration of Audios or Videoscombined_duration
AttributesHiddenattribute_hidden
AttributesRead Onlyattribute_readonly
AttributesHidden File Extensionattribute_hiddenext
AttributesRatingattribute_rating
AttributesLinkattribute_link
ChecksumsMD5checksum_md5
ChecksumsCRC-32checksum_crc32
ChecksumsCRC-32Bchecksum_crc32b
ChecksumsSHA-1checksum_sha1
ChecksumsSHA-224checksum_sha224
ChecksumsSHA-256checksum_sha256
ChecksumsSHA-384checksum_sha384
ChecksumsSHA-512checksum_sha512

More than one of these parameters can be separated by a comma. For example, if you want to create a file list listing the file name and information about the width and the height of images, you can use the column parameters in the form "cols=name,image_width,image_height". You can find information about which formats and types of audio files, video files, image files and documents the format-specific columns support in the overview of the supported formats of the FilelistCreator.

Overview of all Placeholders for the File Name

In the file name (defined via the save parameter) with which the file list is saved, the following placeholders can be used for the current date, the current time as well as for various list properties:

PlaceholderMeaning
%date%Current date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy%-%mm%-%dd%)
%dd.mm.yyyy%Current date in the format "day.month.year" (two or four digits with leading zeros if necessary; short form for %dd%.%mm%.%yyyy%)
%yyyy-mm-dd%Current date in the format "year-month-day" (two or four digits with leading zeros if necessary; short form for %yyyy%-%mm%-%dd%)
%time%Current time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh%-%ii%-%ss%)
%hh-mm-ss%Current time in the format "hour-minute-second" (two digits with leading zeros if necessary; short form for %hh%-%ii%-%ss%)
%hh-mm%Current time in the format "hour-minute" (two digits with leading zeros if necessary; short form for %hh%-%ii%)
%yyyy%Current Year written with four digits
%yy%Current Year written with two digits
%mm%Current Month, always two digits, leading zeros if necessary
%m%Current Month, one or two digits without leading zeros
%dd%Current Day, always two digits, leading zeros if necessary
%d%Current Day, one or two digits without leading zeros
%hh%Current Hour, always two digits, leading zeros if necessary
%h%Current Hour, one or two digits without leading zeros
%ii%Current Minute, always two digits, leading zeros if necessary
%i%Current Minute, one or two digits without leading zeros
%ss%Current Second, always two digits, leading zeros if necessary
%s%Current Second, one or two digits without leading zeros
%total_files%Total number of all files in the file list
%total_size%Sum of the file size of all files in the file list
%total_duration%Total playing time of all audio and video files in the file list
%total_lines%Sum of lines of all text files in the file list
%total_chars%Sum of characters of all text files in the file list
%total_words%Sum of words of all text files in the file list

For examples of using these placeholders, see the sections on writing the date and the time to the file name as well as on writing list properties to the file name. Please note that the character % have to be doubled when using it in script calls so that the placeholders are not interpreted as variables.

Download of the FilelistCreator CL

For the functions presented on this page you need the CL version of the FilelistCreator. You can get these on this page. The standard version of the FilelistCreator does not contain any script control features.