Jump to content

Recommended Posts

Posted (edited)

I have a problem.

I'm making a batch file to create a .rc file for a list of files in a directory.

The only problem I have is I can't echo a "|" character.

The ascii is 124.

this is one of the lines I would like to echo

>>diag%x%.rc echo STYLE DS_FIXEDSYS | DS_MODALFRAME | DS_CENTER | WS_POPUP

How can it be done, or is there a vb alternative I could use?

Thanks in advance.

Edited by jaws75

Posted

Tried putting quotes around the whole string and then stripping the quotes off later with sed?

Or, this might be a job better done with a sed script.

Posted

Like this it could work...

>>diag%x%.rc echo STYLE DS_FIXEDSYS ^| DS_MODALFRAME ^| DS_CENTER ^| WS_POPUP

ASCII 94 before |

:hello:

Posted (edited)

Try this for your line instead, if this is for a batch file then it will work.

jdoe, you beat me for the post because this was what I was going to post also.

So I will post the batch script that I tested on the line.

@echo Off 
set x=102
>>diag%x%.rc echo STYLE DS_FIXEDSYS ^| DS_MODALFRAME ^| DS_CENTER ^| WS_POPUP
echo STYLE DS_FIXEDSYS ^| DS_MODALFRAME ^| DS_CENTER ^| WS_POPUP
pause

Edited by gunsmokingman

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...