K
K
kevus2018-09-03 23:25:49
Command line
kevus, 2018-09-03 23:25:49

How to get a list of all files in a folder and copy it to TXT?

Hello. There are two local folders, for example
C:\Users\Adm\Documents\folders\folder_name_1
C:\Users\Adm\Documents\folders\folder_name_2
They contain files (*.html mask)
How to get this list of files in TXT?
Ie just a list of files on a new line (links to files - full path)
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
ilyushchenko, 2018-09-04
@ilyushchenko

Alternatively, you can create a .bat file and paste the following code:

@ECHO OFF
FOR %%f IN (%1*.html) DO ECHO %%f >> list.txt

When running it, pass as the first parameter the path to the folder for which you want to get a list of files
C:\Users\{User Name}\list.bat C:\Users\Adm\Documents\folders\folder_name_1\

R
Rainbow Spike, 2019-02-28
@DrYukon

For reference, in Total there is a cm_CopyNamesToClip command for copying file names, it can be hung up in the settings on the F11 key, for example 5c7835fdda505201792871.png
* Check if there are already assigned keys with such a command
** Select keys
*** Select the Commander's internal command from the list
*** * [REQUIRED] Add it to the config (at that moment the button looks like a bright green checkmark)
But for the full automation of the task, the answers of other experts are better suited

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question