"Hello, could you please provide instructions on how to create a list of files in Total Commander (TC) that includes quotation marks around each file, as shown in the example below:
""Text.txt""
""Folder""
Your assistance is greatly appreciated."
Any instructions? how to create a list of files including quotation marks?
Moderators: Hacker, petermad, Stefan2, white
-
- New Member
- Posts: 1
- Joined: 2023-09-07, 03:13 UTC
Re: Any instructions? how to create a list of files including quotation marks?
That's not a format which can be created native by TC.
One possible solution is:
Select your dirs and files
Use a button with the command cm_CopyFullNamesToClip.
Start your editor
Paste the clipboard content
Use a RegEx to add the quotation marks around all lines.
In PSPad editor for example
Search for
^(.*)$
Replace by
""$1""
One possible solution is:
Select your dirs and files
Use a button with the command cm_CopyFullNamesToClip.
Start your editor
Paste the clipboard content
Use a RegEx to add the quotation marks around all lines.
In PSPad editor for example
Search for
^(.*)$
Replace by
""$1""
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Any instructions? how to create a list of files including quotation marks?
* Mark the files/folders.jackhawkins wrote: 2023-10-10, 10:00 UTC Hello, could you please provide instructions on how to create a list of files in Total Commander (TC) that includes quotation marks around each file, as shown in the example below:
""Text.txt""
""Folder""
* Open the Multi-Rename Tool.
* Set options as in this screenshot and choose "Edit names" as shown in the screenshot.
* Save the file to a name and location of your choice.
BTW, it's a bit weird to add double double quote characters. If you meant single double quote characters then replace the double double quote characters with single double quote characters

Re: Any instructions? how to create a list of files including quotation marks?
Another way - download and install MakeBAT plugin - https://plugins.ghisler.com/plugins/makebat.zip
You can assign it for TXT extension or default - BAT and change manually on "Pack files" dialog window.
Select files in source panel and use "Pack" command under "Files" menu (Alt+F5) (you actually don't pack files, only doing some manipulation with it's names)
When dialog window "Batch files creator" appear type ""%N"" and press OK. Names will be packed to target directory.
Note: no support for files in subdirectory unless you use Branch View or search na %P%N parameters.
Although my experience tell me that maybe you need just single double quotes.
Also - it's rather clear that this is only part of your problem, so maybe explain the whole problem, not part of it?
You can assign it for TXT extension or default - BAT and change manually on "Pack files" dialog window.
Select files in source panel and use "Pack" command under "Files" menu (Alt+F5) (you actually don't pack files, only doing some manipulation with it's names)
When dialog window "Batch files creator" appear type ""%N"" and press OK. Names will be packed to target directory.
Note: no support for files in subdirectory unless you use Branch View or search na %P%N parameters.
Although my experience tell me that maybe you need just single double quotes.
Also - it's rather clear that this is only part of your problem, so maybe explain the whole problem, not part of it?
Re: Any instructions? how to create a list of files including quotation marks?
Hello and welcome jackhawkins
you could utilize PowerShell (or any other scripting language) from an TC-Button
in combination with TCs parameter '%F' to output the selected files surrounded by doubled double quotes:
Get-Content ' %F ' | Foreach-Object{ [char]34 + [char]34 + $_ + [char]34 + [char]34 }
- - -
-- create an button
Copy&Paste button code:
-- select the wanted files
-- click at your new button
-- watch the output:
Example output with '%F' parameter
"d\""
"e\""
"LANGUAGE\""
"DEFAULT.BAR""
"descript.ion""
"HISTORY.TXT""
"TOTALCMD.CHM""
"TOTALCMD.INC""
"TOTALCMD.EXE.MANIFEST""
"TOTALCMD.EXE""
"TOTALCMD64.EXE""
Example output with '%L' parameter
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\d\""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\e\""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\LANGUAGE\""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\DEFAULT.BAR""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\descript.ion""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\HISTORY.TXT""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD.CHM""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD.INC""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD.EXE.MANIFEST""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD.EXE""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD64.EXE""
jackhawkins wrote: 2023-10-10, 10:00 UTC "Hello, could you please provide instructions on how to create a list of files in Total Commander (TC) that includes quotation marks around each file, as shown in the example below:
""Text.txt""
""Folder""
Your assistance is greatly appreciated."
you could utilize PowerShell (or any other scripting language) from an TC-Button
in combination with TCs parameter '%F' to output the selected files surrounded by doubled double quotes:
Get-Content ' %F ' | Foreach-Object{ [char]34 + [char]34 + $_ + [char]34 + [char]34 }
- - -
-- create an button
Copy&Paste button code:
Code: Select all
TOTALCMD#BAR#DATA
PowerShell -NoExit
TYPE '%F' | Foreach{ [char]34 + [char]34 + $_ + [char]34 + [char]34 }
powershell
Output selected files with doubled "double quotes" added
-1
-- select the wanted files
-- click at your new button
-- watch the output:
Example output with '%F' parameter
"d\""
"e\""
"LANGUAGE\""
"DEFAULT.BAR""
"descript.ion""
"HISTORY.TXT""
"TOTALCMD.CHM""
"TOTALCMD.INC""
"TOTALCMD.EXE.MANIFEST""
"TOTALCMD.EXE""
"TOTALCMD64.EXE""
Example output with '%L' parameter
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\d\""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\e\""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\LANGUAGE\""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\DEFAULT.BAR""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\descript.ion""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\HISTORY.TXT""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD.CHM""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD.INC""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD.EXE.MANIFEST""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD.EXE""
""C:\Temp\tc1100x32_64_rc1_(2023-07-12)\INSTALL\TOTALCMD64.EXE""
Re: Any instructions? how to create a list of files including quotation marks?
Win XP+:
or
In the second button, specify your path to sed.exe.
Code: Select all
TOTALCMD#BAR#DATA
mshta.exe "javascript:with(new ActiveXObject('Scripting.FileSystemObject')){t=openTextFile(getSpecialFolder(2)+'\\'+
'%WF'.replace(/.+(?=CMD\w+\.tmp$)/,''),1,0,-1).readAll().replace(/\n(?!$)/g,'\n""').replace(/^|(?=\r)/g,'""').slice(0,-2);with(openTextFile(getAbsolutePathName('')+'\\FList.txt',2,1,-1)){write(t);close()}};close();"
wcmicon2.dll,46
Create a list of selected names in doubled quotation marks
1
Code: Select all
TOTALCMD#BAR#DATA
%ComSpec% /q/c move
%UF FList.txt&"%%COMMANDER_PATH%%\Utils\sed.exe" -i -r "s/^|$/""""""/g" FList.txt
wcmicon2.dll,46
Create a list of selected names in doubled quotation marks
1
Overquoting is evil! 👎