Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? Copy & Paste without linebreak within TCMD

Jan
652
15
After copy a long line in TCC, the text can be pasted without a linebreak.

In TCMD I have always a linebreak after sign 128 ...

So this is an example after paste from TCC ...
Code:
"C:\Program Files (x86)\F-Secure\Internet Security\apps\ComputerSecurity\Anti-Virus\fsav.exe" c:\ /all /rootkit /spyware /system /REPORT="d:\Temp_for_PRGs&Batches\FSAV-Crep.txt"


and here from TCMD ...
Code:
"C:\Program Files (x86)\F-Secure\Internet Security\apps\ComputerSecurity\Anti-Virus\fsav.exe" c:\ /all /rootkit /spyware /syste
m /REPORT="d:\Temp_for_PRGs&Batches\FSAV-Crep.txt"


I know, the TCC window (not within TCMD) has the same bahaviour as a CMD window. The question is now, can I change this behaviour for TCMD (TCC within TCMD)?
 
Thank you, Rex. I would like to use this copy & paste FROM TCMD (TCC tab) TO an editor (for example). (I have no problem for the vice versa way to insert a long line TO TCMD (TCC tab) anyway (even without <Ctrl>) (maybe I had misunderstood you, however ...)).

I can use <Ctrl> while copy and paste then a single line to an editor. The problem with <Ctrl> is, I have then an additional UNDESIRED blank in the line as you can see here for example ...

Code:
"C:\Program Files (x86)\F-Secure\Internet Security\apps\ComputerSecurity\Anti-Virus\fsav.exe" /all /archive /hard /rootkit /s pyware /system /REPORT="d:\Temp_for_PRGs&Batches\FSAV-FULLrep.txt"

The correct would be ...

Code:
"C:\Program Files (x86)\F-Secure\Internet Security\apps\ComputerSecurity\Anti-Virus\fsav.exe" /all /archive /hard /rootkit /spyware /system /REPORT="d:\Temp_for_PRGs&Batches\FSAV-FULLrep.txt"

Look the word "spyware" ...

Have you (another) idea about this?

PS: I saw right know, the line break is not hardcoded after sign 128, it's related to the TCMD window width. So I can stretch the window, but this is not really a good solution for me because ...
1) TCMD saves such changes.
2) some lines are such long lines that even stretching would be not enough probably ...
 
Last edited:
I don't see a problem with extra newlines when pressing <Ctrl> and then choosing Copy from the right click menu. But I do see spaces at the end of a line being lost. For example, if I select then Ctrl-Copy this
upload_2016-2-19_13-20-27.png


and paste it into an editor, I get only a single line, but the space between 72 and 73 has been lost.
Code:
69 70 71 7273 74 75 76 77

Alpengreis, I can't duplicate your "space in the spyware" one. How did you do that?
 
Good question, vefatica ;-)

I just paste it into my standard editor UltraEdit which is without active wrapping ... I will investigate it. Maybe it's really an editor thing HERE?!

I'll report the result here soon!

Thank you.

EDIT: It's NOT the editor (have the same result even in Notepad), it's the copied text from TCMD (TCC tab) ... I post an complete example a bit later here ...

EDIT2: This is a bit crazy, IT'S DIFFERENT, see the following examples:


Example 1)
test.btm

c&p.JPG


After copy&paste WITH <Ctrl> while copy, I have this result:
Code:
"C:\Program Files (x86)\F-Secure\Internet Security\apps\ComputerSecurity\Anti-Virus\fsav.exe" /all /archive /hard /r ootkit /spyware /system /REPORT="d:\Temp_for_PRGs&Batches\FSAV-FULLrep.txt"
ONE space too much in word "rootkit"!


Example 2)
test2.btm

c&p2.JPG


After copy&paste WITH <Ctrl> while copy, I have this result:
Code:
rem "C:\Program Files (x86)\F-Secure\Internet Security\apps\ComputerSecurity\Anti-Virus\fsav.exe" /all /archive /hard/rootkit /spyware /system /REPORT="d:\Temp_for_PRGs&Batches\FSAV-FULLrep.txt"

ONE space too less before "/rootkit"!


"Example" 3)

Not a demonstrated example here (because not tested (yet)). Just for information: it could be possible to have even a result which is correct, IF THE BLANK IS AT A CORRECT POSITION (where a blank must be) ...
 

Attachments

  • test.txt
    193 bytes · Views: 275
  • test.btm
    1.3 KB · Views: 424
  • test2.btm
    195 bytes · Views: 422
Last edited:
I still can't reproduce your example 1. Your example 2 seems to be the same problem as in my example.
 
Maybe you have different sizes (font, window)?

If I have enough time yet later, I will try with another font (which you can select too, because I have a non-standard one I believe (Source Code Pro)) ...
 
Maybe you have different sizes (font, window)?

If I have enough time yet later, I will try with another font (which you can select too, because I have a non-standard one I believe (Source Code Pro)) ...

Mine's a bit unusual, Andale Mono Bold 10.

You might also try adjusting the width of the TCMD tab ... just a tiny bit, not enough to gain or lose a character.
 
Mine's a bit unusual, Andale Mono Bold 10.

You might also try adjusting the width of the TCMD tab ... just a tiny bit, not enough to gain or lose a character.
At least with my font "Source Code Pro 14", adjust of window width makes no different. As soon as a letter is truncated and this letter is integrated in a word (not the last position of a word) - right after this letter is always a blank then after paste.

Hint: to reproduce example 1, it is necessary to copy ONLY the text (begins with " sign, do NOT copy the blanks before (else here the line is correct too). Then mark, hold <Ctrl> choose Copy and paste it externally ...
 
Last edited:
TCMD will always append a space when concatenating lines.
Unfortunately NOT always, please see my example 2 above. in such a case (I assume because it is a blank at end of line 1 already), the space is removed after a CTRL + Copy ...

This is a bit ... hmm ... ugly, because sometimes it's a blank too much, sometimes one too less.

Well, it's not a big thing and I can use a real TCC window for such things. OR I decide to use NOT the copy with Ctrl and put the line manually together. Nevertheless it would be better, if the "effect" would be ALWAYS the same ... But I can imagine that the "copy with Ctrl effect" is by design anyway.

Enjoy your weekend!
 
[Unfortunately NOT always, please see my example 2 above. in such a case (I assume because it is a blank at end of line 1 already), the space is removed after a CTRL + Copy ...

This is a bit ... hmm ... ugly, because sometimes it's a blank too much, sometimes one too less.}

Unfortunately, still WAD.

If you have a wrapped line, it is impossible for TCMD to determine if the line ended exactly at the right column, or if it was wrapped to the next line. Console window output doesn't have any line endings, so TCMD has to assume that the rightmost non-space character is the last character on the line.

Console windows also don't have a null / "non-character" -- they're initialized to all spaces + the default attribute. TCMD therefore can't assume that a trailing space is anything other than an EOL equivalent.
 

Similar threads

Replies
7
Views
2K
Back
Top