Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using special characters with net use

2,432 views
Skip to first unread message

Mikkel Z. Herold

unread,
Jul 11, 2008, 7:13:08 AM7/11/08
to
I have a batch file that I use to connect to a number of mapped drives
like this:

net use * /d /y
net use S: \\computer\share1
net use S: \\computer\share2
net use S: \\computer\share3 etc.

Now I have a folder on "computer" that has the Danish character "æ" in
the name - how do I go about mapping that as drive? DOS will not accept
the name ("Fælles").

TIA

Mikkel

--
"At first just a rustle of canvas
And the gentlest breath on my face"
Sting, "The Wild Wild Sea"

Tom Lavedas

unread,
Jul 11, 2008, 8:21:40 AM7/11/08
to
On Jul 11, 7:13 am, "Mikkel Z. Herold" <mikkel@[remove_this]mzh.dk>
wrote:

I'm confused, because it worked for me - on my US English XP SP2
equipped machine. Are you sure the folder is marked for sharing?
What exactly is the error (translated to English, of course) - or the
number which we can research to find the exact English version.

Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/

Robert Roland

unread,
Jul 11, 2008, 8:55:41 AM7/11/08
to
On Fri, 11 Jul 2008 13:13:08 +0200, "Mikkel Z. Herold"
<mikkel@[remove_this]mzh.dk> wrote:

>Now I have a folder on "computer" that has the Danish character "æ" in
>the name - how do I go about mapping that as drive? DOS will not accept
>the name ("Fælles").

Is that computer a Windows machine? Whey you create a share with a
special character, you normally get a warning that MS-DOS based
computer will be unable to use the share.

You could try "NET VIEW \\computer" from the DOS machine to see what
the share name looks like.

Alternatively, you can create another share on the server. You can
share the same directory several times using different names, so you
do not have to break existing solutions.
--
RoRo

Ted Davis

unread,
Jul 11, 2008, 9:33:44 AM7/11/08
to
On Fri, 11 Jul 2008 13:13:08 +0200, Mikkel Z. Herold wrote:

> I have a batch file that I use to connect to a number of mapped drives
> like this:
>
> net use * /d /y
> net use S: \\computer\share1
> net use S: \\computer\share2
> net use S: \\computer\share3 etc.
>
> Now I have a folder on "computer" that has the Danish character "æ" in
> the name - how do I go about mapping that as drive? DOS will not accept
> the name ("Fælles").
>

The problem is probably due to the different caharacter sets used by
Windows and the DOS emulator. Try this after mapping the share in Windows
Explorer:

net use > dump.txt

The resulting file should have the share name you want in the form needed
by CMD.EXE

You can also use
net view \\systemname > dump.txt
to get the list of shares on the named system, assuming it's only the
share name that has problems.

The best way to make the problem go away is to require that share (and
system) names use only those characters that have the same character
codes in both environments.

--
T.E.D. (tda...@mst.edu)

Mikkel Z. Herold

unread,
Jul 11, 2008, 9:45:06 AM7/11/08
to
On 11-07-2008 14:55 Robert Roland wrote:
> You could try "NET VIEW \\computer" from the DOS machine to see what
> the share name looks like.

I get this:

Share name Type used as Comment
------------------------------------------
Fælles Disk
backup Disk

etc.

So that looks ok.

I have found out that it works if I execute the net use command directly
from a DOS prompt, but not when I execute it from a batch file.

So, if I write and execute this command from a promt:

net use X: \\computer\Fælles

it works, but when I copy it to a batch file and execute that, the line
comes out as

net use X: \\computer\Fælles

and I of course get an error 53, network path not found.

So it seems that the problem is with the format of the batch file. I
have tried saving it as UTF-8, but it didn't work.

Mikkel Z. Herold

unread,
Jul 11, 2008, 10:04:37 AM7/11/08
to
On 11-07-2008 15:33 Ted Davis wrote:
> The problem is probably due to the different caharacter sets used by
> Windows and the DOS emulator.

You were right! The solution was this:

net use X: \\computer\F‘lles

instead of

net use X: \\computer\Fælles

Thanks a lot - problem solved!

Robert Roland

unread,
Jul 11, 2008, 5:20:21 PM7/11/08
to
On Fri, 11 Jul 2008 16:04:37 +0200, "Mikkel Z. Herold"
<mikkel@[remove_this]mzh.dk> wrote:

>You were right! The solution was this:
>
>net use X: \\computer\F‘lles

I bey you are using a Windows based editor to edit the bat file?

If you look at the bat file with a DOS based editor, it will look much
more sensible.
--
RoRo

Mikkel Z. Herold

unread,
Jul 11, 2008, 7:33:42 PM7/11/08
to
On 11-07-2008 23:20 Robert Roland wrote:
> I bey you are using a Windows based editor to edit the bat file?

Right on :-D

> If you look at the bat file with a DOS based editor, it will look much
> more sensible.

I'm sure it will - I must remember that next time.

0 new messages