DEV Community

IT Command
IT Command

Posted on


How to handle Explanation Point in a Batch file

Hello Everyone, Today I come to you with another strange problem. My friend Josiah has a username which gets him into a lot of trouble. His username is "Josiah!". The problem with this username is that in a batch file where you do something like

Start "C:\Users\%username%\Desktop\File.exe"

it uses the ! in his username and that crashes the prompt. I was wondering if anyone knew a way around it? Thanks! -Luke.

Top comments (1)

it_command profile image
IT Command

I contacted Microsoft and apparently it is an extremely rare bug and most of the time you cannot put exclamation marks in a username!

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git