Christoph Staudinger
Christoph Staudinger

Reputation: 75

DIR command don't work with special characters

I have found some files on the server with special characters in the name. The name is created automatically, so changing them is not an option.

Here an example:

H:\>dir /b "LB_20136021 BÁKÁNY*"  //search with wildcard!

LB_20136021 BÁKÁNY MUVEK GÉPIPARI Kft..pdf              //file found!

H:\>dir "LB_20136021 BÁKÁNY MUVEK GÉPIPARI Kft..pdf"    //search with exact name!

 Datenträger in Laufwerk H: ist SATA 1TB

 Verzeichnis von H:\

Datei nicht gefunden                                    //"file not found"?!?!

H:\>

There are also other problems with commands in batch files.

Is there a sollution to prevent this, or is this a good example why a batch script should not be used any more? (I still like them, but in advanced scripts there are so many nasty problems...)

Upvotes: 2

Views: 1216

Answers (1)

Christoph Staudinger
Christoph Staudinger

Reputation: 75

okay, some hours later I think I have the solution:

The Problem is the U of MUVEK, because it's a hungarian name and it is no U but an Ű

In the dos box it is not visible until you use codepage 852 (suggested for hungary)

so this BÁKÁNY MUVEK GÉPIPARI Kft. becomes this: BÁKÁNY MŰVEK GÉPIPARI Kft.

So if you hate someone, use this char...

Upvotes: 1

Related Questions