How to save text from the Command Prompt in Windows 10

February 2023 · 4 minute read

XINSTALL BY CLICKING THE DOWNLOAD FILE

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:
  • Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  • Click Start Scan to find Windows issues that could be causing PC problems.
  • Click Repair All to fix issues affecting your computer's security and performance
  • Command Prompt is one of the most important features of Microsoft’s Windows operating system. Users can basically perform any action on their computers with this tool, from checking data, to solving various problems, and many more complex actions.

    If you use this tool regularly, you’d probably want to save some often-performed commands, so you don’t have to type them over and over again. Well, in Windows 10‘s Command Prompt that’s possible, and there are even a couple of ways to do so.

    In this article, we’re going to show you how to save any Command Prompt command as text, so you can easily use it whenever you want.

    How to save text from Command Prompt

    Method 1 – Create an executable command

    The most effective way to run a command over and over again is to simply create an executable of that command. To do that, you simply need to write a command in Notepad, save it as .bat, and execute it. To show you how to do that, we’re going to use a simple, and one of the most popular commands sfc/scannow, but of course, you can use any command you want.

    Here’s what you need to do:

  • Open Notepad
  • Write a command in Notepad (In our case, that’ll be sfc/scannow)
  • Go to File > Save, select All files from the dropdown menu, and save it as .bat file wherever you wantsave text command prompt
  • That’s it, you can now open the .bat file you’ve just saved, and it will perform the same command each time. You just need to open it as Administrator.

    Method 2 – Left click + Enter

    Creating a .bat file is the most effective way of performing the same command multiple times. However, a lot of commands are there to show you some data, like your ping status, or hard drive info. So, if you want current results from a command, you cannot perform it over and over again.

    In that case, you’ll want to save data from the Command Prompt into a text file. There are a few ways to copy text from the Command Prompt to the clipboard, and the simplest one is to select text with the left mouse button, and press Enter.

    So, when a certain command is performed, just select the text using your left mouse button, press Enter, and the text will be immediately copied. You can later paste it wherever you want, but it will most likely be a text document.

    save text command prompt 1

    We’ve used a ping test of our internet to show you how to do that, but of course, you can use whichever command you want, results are the same.

    Method 3 – Use the clip command

    There’s another way to copy results from a command in the Command Prompt, that some users will find even easier. That’s a simple Command Prompt command called ‘clip’ that allows you to copy everything from a window to the clipboard.

    To perform this, just wait for the previous command to be executed and show results, just write the command once again, add ‘|clip’ after it, and press Enter. Once you’ve done that, everything will be copied to the clipboard, and you’ll be able to paste it wherever you want. We used the ping command once again, but of course, this works for any other command that gives return information.

    save text command prompt 3

    That’s about it, as you can see, copying text from the Command Prompt is quite easy, and it requires minimal effort. If you have any comments, or questions, just let us know in the comments below.

    RELATED STORIES YOU NEED TO CHECK OUT:

    ncG1vNJzZmivmaOxsMPSq5ypp6Kpe6S7zGirnrCkYrCwucyapZ1loKe8rrzTZq6ippSkxLR5kGlm