Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7703807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:32:34+00:00 2026-05-31T23:32:34+00:00

I have a bunch of dynamically created *.BAT files. These BAT files are used

  • 0

I have a bunch of dynamically created *.BAT files. These BAT files are used to create folders in a server. Just one line in each BAT file, such as: MKDIR \NetworkShare\abc\123

This “abc\123” string is from a database.

It runs OK for a while to create thousands subfolders on demand until today it stopped creating a special subfolder which has a “close single quote” (Alt + 0146 if typing from dos prompt) in the string.

I did some research and found that this “close single quote” is an extended ASCII character. It can’t be saved properly in ANSI BAT file (end up as something else). I tried UNICODE and UTF-8 BAT file, but it doesn’t work.

The only near-close solution is that I tried a binary editor to make sure it’s code 146, but code 146 gives me Æ (ALT-146) not “close single quote” (Alt + 0146).

I know I can manually type special characters in DOS prompt (by using keyboard Alt + ).
But is there a way to properly save this “close single quote” (Alt + 0146) in BAT file so I can execute them dynamically?

The host system is Windows Server 2003 US-English.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:32:35+00:00Added an answer on May 31, 2026 at 11:32 pm

    Thank you for this CHCP 65001 trick. It leads to proper solution:

    I took follow steps to resolve the issue:

    +++++++++++++++++++

    Prepare the BAT Text File (either manually or dynamically)

    +++++++++++++++++++

    (1) Make the first line blank (this is necessary, because there are hidden chars in the first line for UTF-8 text file)

    (2) Put CHCP 65001 as second line

    (3) main line here: MKDIR \networkshare\abc(right single quote–>this is special extended ASCII char)\123

    (4) make sure the BAT file saved as UTF-8

    +++++++++++++++++++

    Now it’s the CMD.EXE trick

    +++++++++++++++++++

    (1) Start cmd.exe

    (2) open cmd.exe black screen property

    (3) make sure the black screen font is “true type” i.e. “TT” like. By default, it is raster font, can not handle special ascii code properly. (This is the key step)

    (4) now I can run my BAT to handle those extended ASCII chars properly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a table which contains a bunch of dynamically created radio button lists,
I'm trying to dynamically create a bunch of class properties, but each dynamic fget
Currently, I am using headjs to load my javascript files dynamically. I have bunch
i have a bunch of code where i dynamically create dropdown boxes in javascript.
I have a bunch of dynamically created elements in a page, with different 'onmouseover'
So i have a bunch of dynamically loaded labels.. Each of them has the
week DKK id=radio2 value=75 /> I have bunch of these div entry generated by
I have a bunch of files in a folder checked out from a repository.
I have a bunch of html files that come with my app and are
I am using NHibernate with NHibernate.Linq, and have a bunch of dynamically loading modules

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.