www.infocellar.com/mystery.zip
If you save it and then view in Notepad, and then in DOS (just use the
"type" command in DOS or use the DOS edit command to open it), then
you will see the oddity.
As Timo stated, it must have something to do with the text coding but
how could this happen? Here is the contents of the file I posted
(mystery.txt). It has 3 lines showing the characters that soemhow
are messing me up.
Line 1) shows dashes in Notepad, but it shows that weird u symbol with
high-hat in DOS. If you copy from Notepad to DOS, they become u with
high-hat. If you then copy the u with high-hat from DOS and paste
into Notepad, they becomes dashes.
Line 2) dashes in both Notepad and in DOS
Line 3) the u with highhat in if vieing in Notepad, but checkmarks in
DOS. If you copy from Notepad to DOS, they show as checkmarks. If
you then copy the checkmark from DOS and paste into Notepad, they
becomes the u with high-hat
No mystery; different byte values can have different meanings in
different character sets.
DOS probably uses the PC-8 character set, unless a diffent one has
been configured via CONFIG.SYS. (Or in a non-US version of DOS? Or,
perhaps, if you are using "DOS" to mean a command shell under some
version of Windows.) PC-8 is a superset of ASCII, with high-order
graphic characters. Windows probably uses the ANSI character set
(if you are in the correct newsgroup), or Unicode (if you're in the
wrong one.) In all three character sets, 45 decimal / 96 hex is the
correct value for a hyphen.
--
Charles Dye ras...@highfiber.com
Confirmed. This is a font related copy/paste problem connected to use of
graphics characters (128-255). This is normal. What are you trying to
accomplish?
--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)
It is a batch file to take a bunch of videos and create RAR parts
without me having to do it one at a time unting the Windows interface.
So I went to DOS and did a: dir /b >temp.bat
to get a list of all the video files. Then I opend the text file in
Word and used a search and replace to replace the carriage returns
with "carriage return winrar" to put the word "winrar at the beginning
of each line. I edited in the rest using search and replace where I
could and manually where I had to use manual entries.
But now I see something else. I needed to add a winrar option switch
to each command line. The switch I used to tell winrar to create 10
MB file parts is "-v10m" (volumes = 10 MB each). The syntax of each
command line is;
winrar a -v10m "rar_file_name" "video_file_name"
(the "a"safter winrar is the switch to tell winrar to "add" the file
to an archive, as opposed to "x" for extract from the archive).
I just went back and tried it again. I found that in Word, if you
type -v10m at the beginning of a line in it puts a dash there as you
would expect. But if you type it anywhere else it replaces the dash
with a long dash ("em" I guess). I did not notice that until just
now.
Then I saved it as a text file and in Notepad it just looks like a
regular dash.
Kev
> Then I saved it as a text file and in Notepad it just looks like a
> regular dash.
If you must use Word to edit batch files, be sure that autocorrect and
autoformat are turned off. Otherwise you'll get all sorts of unwanted
substitutions. It's far better to use a plain text editor, even Notepad,
for batch files. There are many good free or inexpensive text editors
available.
--
Gary L. Smith
Columbus, Ohio
Like EDIT for instance - can't beat the price. "Good" is subjective.
Try
EDIT /?
from the prompt....
Word has a great advantage in that I can replacing the end Paragragh
mark via the "Special" button in the Replace dialog box. That way I
can easily insert anything at the end of every line by just replacing
the carriage return with a string followed by a carriage return. . .
or insert anything at the beginning of every line by replacing the
Paragraph mark with a paragraph mark followed by a string. This batch
file has about 50 lines (to RAR 50 videos into compressed parts), so
Word was a real time-saver.
If I do not need to add anything to the beginning or end of the lines
- then yes, I just use Notepad. You are right about turning off
Auto-Correct. That was the problem. I found a checkbox that says
"Replace hyphens (- -) with dash (--). In the research I did today I
found that there are three dashes:
dash (hyphen), en dash, and em dash
- -- ---
Apparently, Word calls the regular keyboard dash, a "hyphen". The
hyphen is the regular dash and the "en dash" is longer. The "em dash"
is longer still !! In fact, some call the en-dash "shart dash" and
the em dash "long dash". Here is a table of the three types shown in
various fonts: http://www.infocellar.com/software/symbols.htm
I notice that Word keeps the dash short when you type it as the first
character of a line, or if used as a separator (for example,
first-floor). But whenever you use it as the first character of
anything other than the beginning of a line, it replaces it with the
en-dash. This autocorrect stuff is nuts !! Thanks for the tip - I
turned the damn thing off.
Note, with the proper command, your batch file creation would not have
needed to be edited at all.
for %? in (*.ext) do echo winrar a -v10m "rar_file_name" "%?" >>temp.bat