Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to copy multiple lines from the Windows Command Prompt without it inserting a new line where each line reaches the end of the terminal?

For example, if I have the following line in the console:

c:\very_long_path_here\more_path_here>command_i_want_to_copy -with -some
arguments that wrap over lines.

If I select this and copy it, I will get a newline after the word 'some', which I'll have to delete manually.

Is there a way to copy the data (command that will be parsed, output that is printed) in the form it is interpreted/printed, rather than with hard-wrapped lines?

share|improve this question
    
In Win 7/8 there is a clip.exe, which redirects input to clipboard. You can use it like c:\> echo your -command | clip.exe. But it's more suitable for a command output.. –  week Mar 15 '13 at 10:37
    
afaik there is no built in way to do this. but maybe you can combine something like a short autoit script with clip.exe to archive your goal –  weberik Mar 15 '13 at 12:41

1 Answer 1

Use the SET and then combine the parts in the expression. Additionally you can do for such purposes batch file or macro.

@set WAIKTools=%ProgramFiles%\WAIK\Tools\amd64
@set LabelCD=GRTMPVOL_RU

@IF "%time:~0,1%" GTR "0" SET current=%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%@%TIME:~0,2%.%TIME:~3,2%.%TIME:~6,2%
@IF "%time:~0,1%" LSS "0" SET current=%DATE:~-4%-%DATE:~3,2%-%DATE:~0,2%@0%TIME:~1,1%.%TIME:~3,2%.%TIME:~6,2%

"%WAIKTools%\oscdimg.exe" -h -m -n -l%LabelCD% -b"%cd%\boot\w32sp3.bif" "BUILD-%current%" "BUILD-%current%-ISO\%LabelCD%.ISO"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.