Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start a CMD, then echo off of it, then clear the screen

Tags:

batch-file

Here are the steps I need, I am using a batch script

  1. Open a cmd with path set to the desktop
  2. Then set it's echo off
  3. Then clear the screen
  4. Then wait for me to type commands

So I can enter the commands directly without a long line blocking the view

Code I tried so far

@echo off
cd "C:\Documents and Settings\Administrator\Desktop"
cls
cmd
@echo off
cls

But when I run this I get a typical CMD window, where I have to type "echo off" & "cls" again to get a clean window.

The output I get is

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator\Desktop>

The output I want is simple

Imagine a blinking underscore

_

Thank you.

like image 422
Slug Avatar asked Mar 23 '13 10:03

Slug


1 Answers

Try this line:

start /D "C:\Documents and Settings\Administrator\Desktop" cmd /k "prompt $"

/D <path> will set your working directory

Prompt $ will set your prompt to "nothing", only the blinking cursor will display

like image 165
Stephan Avatar answered Sep 20 '22 06:09

Stephan