windows - Trying to save an altkey to a CMD or BAT file -
I am trying to delete a folder with a name created with an Alt key 0160. That's for automation purposes for my CMD and I can not save it. It works like im looking for an 'A' with apostrophe How can I save the CMD file properly?
You can include your values directly in the batch script, in the same command line Type, some set as "var =
alt + 0160 "
if your editor or your environment (Pagercode, charset) interfere, you can use a short autogenerated script to get the problematic character
@echo off setlocal enableextensions disabledelayedexpansion call: getChar 16 0% myVar encode [% myVar%] exit / b: getChar asciiCode for returnVar %% ("% temp% \ n ~% n%.% Random% .tmp") (& gt; "%% ~ fa" Set to write WScript.StdOut CH (% ~ 1 ^) / f delims ^ = ^ eol ^ = %% b in ('cscript // nologo // e: vbscript "%% ~ fa"') "% ~ 2 = %% b "del / q" %% ~ fa "& gt; null 2 & gt; and 1) & amp; Can handle
, or
set
forand what can be included inside a variable in it. Therefore, it will not work for all possible characters but in your case it should work.
Comments
Post a Comment