Color Function 21 22 23c

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Aacini
Expert
Posts: 1564
Joined: 06 Dec 2011 22:15
Location: México City, México

Re: Color Function 21 22 23c

#31 Post by Aacini » 25 Aug 2018 19:22

CirothUngol wrote:
25 Aug 2018 16:25

Off topic, is there also a quick and efficient native solution for locating the cursor at specific location in the console window?
I strongly suspect that the only satisfactory solution will be an external one, but I'm looking at native alternatives anyway. ^_^
Move cursor to *any position* using just ECHO command

jeffshead
Posts: 1
Joined: 17 Nov 2018 10:48

Re: Color Function 21 22 23c

#32 Post by jeffshead » 17 Nov 2018 10:59

@Carlos
I just came across your OUT.EXE. Awesome! Thanks for sharing.

However, I did encounter an issue. I need to pass a variable to OUT.EXE so it is echoed in a particular color. The variable is a path. OUT.EXE strips the "\" slashes.

Example:
Variable is: %pathToFile%

Line of code:

Code: Select all

"%filesFolder%\out.exe" 09 "%pathToFile%\r\n"
The code above outputs the following:
C:UsersjohnDesktopfolder

It should be:
C:\Users\john\Desktop\folder


Is there anyway to work around this?

=======================
UPDATE: I found a solution.
=======================

Change:

Code: Select all

"%filesFolder%\out.exe" 09 "%pathToFile%\r\n"
To:

Code: Select all

"%filesFolder%\out.exe" 09 "%pathToFile:\=\\%\r\n"

Post Reply