Gas Electricity | Cheap Magazine | Loans | Free Ringtones | Communication protocols
A really simple question in batch files, and I mean SIMPLE [Archive] - PCMech Forums

PDA

View Full Version : A really simple question in batch files, and I mean SIMPLE


robo555
09-22-2000, 09:28 AM
I done a batch file for backing my stuff up, and just for eye candy (if you can call DOS eye candy), I added a few echo commands to tell the user what's happening, my question is, how to I put gaps between the lines?

My batch file goes something like this:

@echo off
echo Backing up ICQ db
copy blah blah
echo Back up successful

echo Backing up My Docs
copy blah blah
echo Back up successful

And on the screen it shows up as:

Backing up ICQ db
Back up successful
Backing up My Docs
Back up successful

But I want it to look like:

Backing up ICQ db
Back up successful

Backing up My Docs
Back up successful

So how to I put a gap between the lines? I tried putting empty echo tags in there and it didn't do anything.

mosquito
09-22-2000, 10:34 AM
hehe you can't

What I do is put a . (dot) in front of every line.

@echo off
echo .Backing up ICQ db
copy blah blah
echo .Back up successful
echo .
echo .Backing up My Docs
copy blah blah
echo .Back up successful

And on the screen it will show up as:


.Backing up ICQ db
.Back up successful
.
.Backing up My Docs
.Back up successful

Ok, it's not the best you can do, but I can live with it.

I heard that you can fake it with a tab, but I haven't seen it working

gibben
09-22-2000, 02:45 PM
A simple "echo." (no space between the echo and period) will do what your are asking.

echo Some text
echo.
echo Some more text

mosquito
09-22-2000, 03:17 PM
Wtf, Grrr, I spent like 2 days looking for that one, thanks gibben

bob
09-22-2000, 04:45 PM
You can also echo the char [alt]255 to center text