Jump to content

Spaces in Folder Name


tang
 Share

Recommended Posts

Hi,

I am using windows 2003 server. When running cd %tmp% on command prompt, getting a space in folder name(C:\DOCUME~1\BilluTst\Local Settings\Temp). As of I know the spaces are repleced by some character. Is this system configuration problem? Please help.

Thanks and Regards,

tang.

Link to comment
Share on other sites

Welcome to the Windows Forum.

This is obviously how the %TMP% environment variable was set up. You can change it, if you want (to LOCALS~1), or just use quotes in the command:

cd "%tmp%"

Thanks Pat for replying. But the problem is when the same command(cd %tmp% ) is used on a different system, Local Settings is coming as LOCALS~1. Is any problem whith that system?

Thanks,

tng

Link to comment
Share on other sites

try

cd "%tmp%"

The quotation tags will encapsulate any data. For example:

md this is a folder

would result in 4 folders being created:

this

is

a

folder

md "this is a folder"

would result in 1 folder being created:

this is a folder

I have got this , "" will encapsulate the data. But really want to know why in one machine cd %tmp%(without quotation) is returning the path with spaces in folder name and for other the same command is replacing the spaces with some character(like ~).

Thanks,

tng

Link to comment
Share on other sites

The Local Settings folder name is the Windows name, LOCALS~1 is the DOS (8.3) name.

Why some environment variables are set up with the DOS name, others with the Windows name, I don't know. But in your case, having a mixed DOS/WINDOWS name (C:\DOCUME~1\BilluTst\Local Settings\Temp) is very unusual, and it suggests that it has been manually set or changed. So I suggest that you manually set it back to what you expect it to be.

Link to comment
Share on other sites

The Local Settings folder name is the Windows name, LOCALS~1 is the DOS (8.3) name.

Why some environment variables are set up with the DOS name, others with the Windows name, I don't know. But in your case, having a mixed DOS/WINDOWS name (C:\DOCUME~1\BilluTst\Local Settings\Temp) is very unusual, and it suggests that it has been manually set or changed. So I suggest that you manually set it back to what you expect it to be.

Thanks Pat.

But could you please elaborate how to change the settings to get LocalS~1 in place of Local Settings?

Link to comment
Share on other sites

Have you looked at the link I gave you in my earlier post?

Yes Pat I had a look.I got the information how to change the Environment variables.

But the problem is I have

TMP = %USERPROFILE%\Local Settings\Temp

and

USERPROFILE = C:\DOCUME~1\tngTst

on both machines.

But one machine is returning

C:\DOCUME~1\tngTst\LocalS~1\Temp

and the other is returning

C:\DOCUME~1\tngTst\Local Settings\Temp

when i m running %tmp% command. I want to know why there is a space in Local Settings folder name in the path. Why isn't it getting replaced by LocalS~1??

Link to comment
Share on other sites

Guest Day There

The total length of the DOS file name, plus the extension, cannot exceed 11 characters and hence DOS has it LOCALS~1 (8 Chars)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy