Using clipboard to paste text as file name: replace newline by space
Moderators: Hacker, petermad, Stefan2, white
Re: Using clipboard to paste text as file name: replace newline by space
To add:
with TC-parameter and a AHK-script we also can do both in one command:
- copy clipboard content (new name) to a variable
- copy selected file name to clipboard (or to a temp file)
- modify the string in the var (remove line breaks and such)
- rename copied file name with content from the var
with TC-parameter and a AHK-script we also can do both in one command:
- copy clipboard content (new name) to a variable
- copy selected file name to clipboard (or to a temp file)
- modify the string in the var (remove line breaks and such)
- rename copied file name with content from the var
Re: Using clipboard to paste text as file name: replace newline by space
As far as I understand, modern browsers in the address bar don't handle Ctrl+V, but inserting text into the field, which can be done through the context menu with the "Paste" item. Try it yourself.ghisler(Author) wrote: 2023-07-27, 08:01 UTC I don't handle Ctrl+V in any edit boxes, this is handled by Windows itself.
Last edited by Fla$her on 2023-07-27, 13:54 UTC, edited 1 time in total.
Overquoting is evil! 👎
Re: Using clipboard to paste text as file name: replace newline by space
I have no problem using Ctrl+V for filling out the address bar in Microsoft Edge, Google Chrome or FireFox - but maybe those are not categorized as modern browsers?As far as I understand, modern browsers in the address bar don't handle Ctrl+V
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Using clipboard to paste text as file name: replace newline by space
Sure, that's exactly how I do it as well. A quite slow option in a fast workflow (that TC supports with other functionality) ...Stefan2 wrote: 2023-07-27, 08:23 UTC I myself always use the way via notepad (copy from web or document >> paste in notepad >> adjust the text >> copy and paste where I want to)
But that's fine, I can live with that.
Re: Using clipboard to paste text as file name: replace newline by space
2ghisler(Author)
What about implementing Ctrl+Shift+V feature?
Many apps (MS Office, Google Docs etc.) use this hotkey to paste selection as a plain text, without any formatting.
What about implementing Ctrl+Shift+V feature?
Many apps (MS Office, Google Docs etc.) use this hotkey to paste selection as a plain text, without any formatting.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: Using clipboard to paste text as file name: replace newline by space
Yes, but in the meantime I am quite fast using Alt+Tab

and having an editor with scripting support (if need)

I myself doesn't like file managers being that smart and doing things for me in the background, while hiding the truth.
If I have line breaks or such in the clipboard, than that is my own fault and I fix it on my own (IMHO).
Re: Using clipboard to paste text as file name: replace newline by space
Did I write about any problems? You translated incorrectly, taking the phrase out of context.petermad wrote: 2023-07-27, 10:20 UTC I have no problem using Ctrl+V for filling out the address bar in Microsoft Edge, Google Chrome or FireFox - but maybe those are not categorized as modern browsers?
It was assumed that Ctrl+V and insertion by selecting from the menu are handled the same way, i.e. they add text, and the addition itself is handled separately with the replacement of line breaks.
Overquoting is evil! 👎
Re: Using clipboard to paste text as file name: replace newline by space
2Fla$her
And I reply, that I can use Ctrl+V for that, so I don't see your statement as a problem.
Please rephrase/elaborate your original statement if it doesn't mean that Ctrl+V cannot be used to paste text into the address bar of modern browsers.
Here is how I read your statement: "You can not use Ctrl+V to paste text into the address bar of modern browsers, but you can paste text to the address bar via the context menu's "Paste" item".Fla$her wrote:modern browsers in the address bar don't handle Ctrl+V, but pasting text into the field, which can be done through the context menu with the "Paste" item.
And I reply, that I can use Ctrl+V for that, so I don't see your statement as a problem.
Please rephrase/elaborate your original statement if it doesn't mean that Ctrl+V cannot be used to paste text into the address bar of modern browsers.
If I paste copied text with line breaks in for example Edge's address bar, it is inserted the same way whether I use Ctrl+V or the context menu - the line breaks are converted to spaces - so apparently that assumption is correct.Fla$her wrote:It was assumed that Ctrl+V and insertion by selecting from the menu are handled the same way
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Using clipboard to paste text as file name: replace newline by space
Incorrectly, you confuse the opposition of a verb and a noun.
I can describe it in a little more detail:
As far as I understand, modern browsers in the address bar, when replacing characters, don't handle pressing Ctrl+V itself, but inserting text into the field, which (in addition to the hotkey) can be called from the context menu by the "Paste" item.
Apparently so.
Overquoting is evil! 👎
Re: Using clipboard to paste text as file name: replace newline by space
2Fla$her
If that is the case, I would have understood it better, if you in stead of:
"modern browsers in the address bar don't handle Ctrl+V, but are pasting text into the field..."
or
"modern browsers in the address bar don't handle Ctrl+V, but pastes text into the field...."
Pasting as a noun means: "a severe beating, severe criticism, or a severe defeat in a game or competition"
Pasting as a present participle needs to be preceded by for example are, were, have been, had been, will be etc.
So you mean that modern browsers inserts the spaces by using the same function as the context menu uses, and that the function of the context menu is different from the Ctrl+V function itself (even though the item in the context menu is labelled: "Paste Ctrl+V")?modern browsers in the address bar, when replacing characters, don't handle pressing Ctrl+V itself, but inserting text into the field
If that is the case, I would have understood it better, if you in stead of:
had written:modern browsers in the address bar don't handle Ctrl+V, but pasting text into the field...
"modern browsers in the address bar don't handle Ctrl+V, but are pasting text into the field..."
or
"modern browsers in the address bar don't handle Ctrl+V, but pastes text into the field...."
Pasting as a noun means: "a severe beating, severe criticism, or a severe defeat in a game or competition"
Pasting as a present participle needs to be preceded by for example are, were, have been, had been, will be etc.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Using clipboard to paste text as file name: replace newline by space
I can totally relate to that. Still: It's always about finding a reasonable trade-off between manual work and automation...Stefan2 wrote: 2023-07-27, 10:58 UTC I myself doesn't like file managers being that smart and doing things for me in the background, while hiding the truth.
If I have line breaks or such in the clipboard, than that is my own fault and I fix it on my own (IMHO).

Re: Using clipboard to paste text as file name: replace newline by space
2petermad
"pasting" corrected to "inserting".
Yes.So you mean that modern browsers inserts the spaces by using the same function as the context menu uses
No, what makes you think that?and that the function of the context menu is different from the Ctrl+V function itself
Wrong. It's incorrect to equate the insertion handling with the insertion itself. It's not pressing that is handled, but inserting text. That's what I have written.If that is the case, I would have understood it better, if you in stead of:
"pasting" corrected to "inserting".
Overquoting is evil! 👎
Re: Using clipboard to paste text as file name: replace newline by space
Just in case you need it now and often, consider a clipboard manager that allows you to do a "paste special" which would do this for you - or a simple AutoHotkey script - so you not only have it in TC but also in "save as" dialogs.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: Using clipboard to paste text as file name: replace newline by space
Your use of the word "but" - as "in contrary" in your statement.Fla$her wrote:No, what makes you think that?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Using clipboard to paste text as file name: replace newline by space
But I write about the context menu only in an additional clarification after "which (in addition to the hotkey) can be ...", not "but". There is no functional contraposition to the result of using a hotkey.petermad wrote: 2023-07-27, 20:50 UTCYour use of the word "but" - as "in contrary" in your statement.
Below is an automatic translation from Danish to English:
Det er ikke at trykke på genvejstasten, der håndteres, men indsætte tekst.
It is not pressing the hotkey that is handled, but inserting text.
Overquoting is evil! 👎