How to save commands in cmd

grgboss -  
 jules -
Hello, I would like to know how to avoid having to enter the command in the command prompt and just be able to click on a shortcut to run the command.
Configuration: Windows Vista Internet Explorer 7.0

2 answers

  1. mino262 Posted messages 750 Registration date   Status Member Last intervention   103
     
    create a batch file,

    you create a .txt file, you write your commands ... you save it, then you change the extension, you convert it to a .bat file

    then you double-click on it ...

    for example, if you want to shut down your computer by opening a file,
    you create a file with

    shutdown -s -t 0

    and by double-clicking on it, it shuts down your computer.

    for more info: click here =)
    8
  2. jules
     
    You just need to create a new text document that you can name whatever you want, but it must end with .bat
    Inside, write your cmd command and save it on your desktop, selecting "all files" instead of "text file"
    and with the encoding "ANSI", then you just have to click on "save"
    Next, open the .bat file (not the text document) and a
    cmd page will open with the command requested by the text document

    from Jules De Méo
    2