You are not logged in.

#1 23 Sep 2015 15:48

Batcher
Member
Registered: 20 Jul 2015
Posts: 56

Type on same line

is it possible to use the command
Echo welcome && type name.txt
but force welcome and the content of name.txt to be on the same line?
Thanks

Offline

#2 23 Sep 2015 16:11

npocmaka
Member
From: Bulgaria
Registered: 03 Dec 2009
Posts: 446

Re: Type on same line

(break| set /p= Welcome ) &echo something else

Offline

#3 24 Sep 2015 00:37

foxidrive
Member
Registered: 04 Apr 2013
Posts: 339

Re: Type on same line

If this is your thread http://www.dostips.com/forum/viewtopic.php?f=3&t=6679

Then perhaps you just want this:

@echo off
cls
set /p "name=Name: "
echo Welcome %name%
pause

If there are likely to be poison characters in the name then you can use this:

@echo off
cls
set /p "name=Name: "
for %%a in ("%name%") do echo Welcome %%~a
pause

Offline

#4 26 Sep 2015 21:18

Batcher
Member
Registered: 20 Jul 2015
Posts: 56

Re: Type on same line

Thank you foxdrive and npocmaka

Offline

Board footer

Powered by