create a text file of file(name)s

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
extelligenzia
Junior Member
Junior Member
Posts: 6
Joined: 2020-02-03, 14:58 UTC

create a text file of file(name)s

Post by *extelligenzia »

Hi
i am looking for an app thats create a text file with a list of the files (name) in the panes. Basically like using the "dir" command, but my search pattern is often too complex to write in a dir command, and as it is i use totalcommander
I have tried 2 apps, but they both create a zip / structured files.

so the result of the app should be like:

textfilemadebytotalcommanderapp.txt:

c:\msi\doc\filea.jpg
c:\msi\base\fileb.mdb
...
...
its nice to have a brain that can think, then I dont need to
extelligenzia
Junior Member
Junior Member
Posts: 6
Joined: 2020-02-03, 14:58 UTC

Re: create a text file of file(name)s

Post by *extelligenzia »

I found and use makebat app, which saves the result as a "text" file
its nice to have a brain that can think, then I dont need to
User avatar
Usher
Power Member
Power Member
Posts: 1727
Joined: 2011-03-11, 10:11 UTC

Re: create a text file of file(name)s

Post by *Usher »

Use menu Mark -> Copy Names with Path to Clipboard
Andrzej P. Wozniak
Polish subforum moderator
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: create a text file of file(name)s

Post by *petermad »

2extelligenzia
You can use one of these internal commands:
cm_SaveSelectionToFile=2031;Save file selection to file
cm_SaveSelectionToFileA=2041;Save file selection to file (ANSI)
cm_SaveSelectionToFileW=2042;Save file selection to file (Unicode)
In the next version of my Extended Menus - there is a comprehensive section with copying og file names: https://madsenworld.dk/tcmd/copyfilenamesmenu.png

And a section for using the saved fileselection to reselect files: https://madsenworld.dk/tcmd/getselectionmenu.png
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Usher
Power Member
Power Member
Posts: 1727
Joined: 2011-03-11, 10:11 UTC

Re: create a text file of file(name)s

Post by *Usher »

2petermad
Peter, these "save selection" commands don't save full path by default.These are not the droids 2extelligenzia is looking for.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: create a text file of file(name)s

Post by *petermad »

2Usher
If he wants full path he has to either go via the clipboard with: cm_CopyFullNamesToClip or cm_CopyNetNamesToClip

Or he can make em_commands like these:

Code: Select all

em_copynamestofileA]
cmd=%COMSPEC% /C
param=if exist "%P" copy "%L" "%PSELECTEDFILES.txt"
menu=Copy selected filenames with full path to file in current folder (ANSI)
iconic=1

Code: Select all

[em_copynamestofileB]
cmd=%COMSPEC% /C
param=if "%P" copy "%WL" "%PSELECTEDFILES.txt"
menu=Copy selected filenames with full path to file in current folder (Unicode)
iconic=1

Code: Select all

[em_copynamestofileC]
cmd=%COMSPEC% /C
param=if exist "%P" copy "%UL" "%PSELECTEDFILES.txt"
menu=Copy selected filenames with full path to file in current folder (UTF-8)
iconic=1
Last edited by petermad on 2020-02-05, 04:21 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
tuska
Power Member
Power Member
Posts: 4114
Joined: 2007-05-21, 12:17 UTC

Re: create a text file of file(name)s

Post by *tuska »

2petermad
I have tried your codes out of interest.

Here are just two small remarks:
- [em_copynamestofileA]
- param=if exist "%P" copy "%WL" "%PSELECTEDFILES.txt"

Then buttons also work with these em_commands.

Regards
Karl
User avatar
Usher
Power Member
Power Member
Posts: 1727
Joined: 2011-03-11, 10:11 UTC

Re: create a text file of file(name)s

Post by *Usher »

petermad wrote: 2020-02-04, 17:32 UTC 2Usher
If he wants full path he has to either go via the clipboard with: cm_CopyFullNamesToClip
Did I say anything else before?
https://www.ghisler.ch/board/viewtopic.php?p=368979#p368979
Andrzej P. Wozniak
Polish subforum moderator
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: create a text file of file(name)s

Post by *petermad »

2tuska
- param=if exist "%P" copy "%WL" "%PSELECTEDFILES.txt"
Thanks - I have edited my previous post.

I actually simplified the en_commands from my Extended Menus, and failed to delete the "not" for that command in the process.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: create a text file of file(name)s

Post by *petermad »

2Usher
Did I say anything else before?
You suggested to use the Menu, I suggested to use the corresponding cm_command - but apart from that - no, you didn't.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
nsp
Power Member
Power Member
Posts: 1951
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: create a text file of file(name)s

Post by *nsp »

If you manipulate ansi file name, you can use TCBL to extract and filter filename only !

If you want unicode textfile, you can use the following:

Code: Select all

command %comspec% /c
parameters:cd %P&&copy /Y %WF  ListFile.txt
...
unfortunatelly it will not work inside Zip or FileSystem plugin...
L is for FileName with Path
F is for FileName only

[- Edited \c \y to /C /Y as petermad advise /added cd%P&& to stop/protect in VitualFolder, ftp, Zip,......]
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: create a text file of file(name)s

Post by *petermad »

2nsp
parameters: copy \Y %WF ListFile.txt
It should be /Y not \Y - but apparently it is not necessary when run from inside TC in an em_command, a button or TC' commandline
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 16118
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: create a text file of file(name)s

Post by *petermad »

unfortunatelly it will not work inside Zip or FileSystem plugin...
And not on FTP-sites either.

That is why I do the test:

Code: Select all

if exist %P
(see: https://www.ghisler.ch/board/viewtopic.php?p=369080#p369080) - to not even try to copy on those places.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply