need help creating a Batch-File

  • Thread starter Rainer Bielefeld
  • Start date
R

Rainer Bielefeld

Hi,

I'm trying to generate a DOS-Batchfile out of Excel and everything works fine until there are german umlauts (like ä, ö, ü) in it.

E.g. if I write a command like

mv c:\ae.txt c:\ä.txt

to the file and I execute the Batchfile the prompt shows

mv c:\ae.txt c:\õ.txt

So, ä gets replaced by õ

I'm creating an Ascii-File

'create Batchfile
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(vBatchFile, 8, True, 0)

but it looks to me that there are differences between ASCII-Format and DOS-Format.

Any ideas?

Best regards,

Rainer
 
R

Rainer Bielefeld

found a workaround/solution:

for me it's good enough just to replace german umlauts (ä, ö, ü, Ä, Ö, Ü).
I will never use other characters which may be different.

vCommand = Replace(vCommand, "ä", Chr(132), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "ö", Chr(148), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "ü", Chr(129), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "Ä", Chr(142), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "Ö", Chr(153), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "Ü", Chr(154), 1, -1, vbTextCompare)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top