Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Extended directory search - spaces in names

Nov
4
0
Hello -

I have a folder called "My Documents" but typing 'CD "My Documents"', with Extended Directory Search enabled, fails to find it. Is this to be expected?
I have run 'CDD /S' to index the drives. I am running Windows 7 with the latest version of Take Command.

Regards

_John Sampson_
 
| I have a folder called "My Documents" but typing 'CD "My
| Documents"', with Extended Directory Search enabled, fails to find
| it. Is this to be expected? I have run 'CDD /S' to index the drives.
| I am running Windows 7 with the latest version of Take Command.

The problem is that CD and CDD work on directories, while "My Documents" is
a FOLDER. IN the MS Windows world, a FOLDER is a symbolic name ("alias") to
a real directory created by the file system. In particular, all of the "My
..." folder names are dynamically assigned to the real directories when you
log in. This allows each of the users of the computer to have their own,
private folders, to which they can refer with the common phrase. This is
like you and I both saying "I am at home", yet meaning two different
locations. But don't despair - look at the variable function @SHFOLDER - it
can provide the true names of nearly every "folder". Youcan create a simple
TakeCommand alias:

alias MyHome=`*cdd %@shfolder[5]`

and voila! You now have a command, MyHome to do what you want. BTW, the
capitalization is for recognizability, TCMD ignores case in all but a very
few cases (all related to processing strings).
--
HTH, Steve
 
The problem is that CD and CDD work on directories, while "My Documents" is
a FOLDER. IN the MS Windows world, a FOLDER is a symbolic name ("alias") to
--
HTH, Steve

Hi,
I'm using
TCC 11.00.39 Windows XP [Version 5.1.2600]
TCC Build 39 Windows XP Build 2600 Service Pack 3

and I have no problem doing a
Code:
CD My Documents
without quotes, which takes me to
Code:
C:\Documents and Settings\jlc\My Documents
When I do a
Code:
cd %@shfolder[5]
it also takes me to
Code:
C:\Documents and Settings\jlc\My Documents
Is John's issue particular to just Windows 7, or am I missing the point?

Joe
 
Is this something that is different in Win7? Because in WinXP, My=20
Documents is a directory, \Documents and Settings\rob\My Documents.

What is the directory that maps to My Documents in Win7?

Steve F=E1bi=E1n wrote:

> | I have a folder called "My Documents" but typing 'CD "My
> | Documents"', with Extended Directory Search enabled, fails to find
> | it. Is this to be expected? I have run 'CDD /S' to index the drives.
> | I am running Windows 7 with the latest version of Take Command.
>=20
> The problem is that CD and CDD work on directories, while "My Documents" is=20
> a FOLDER. IN the MS Windows world, a FOLDER is a symbolic name ("alias") to=20
> a real directory created by the file system. In particular, all of the "My=20
> ..." folder names are dynamically assigned to the real directories when you=20
> log in. This allows each of the users of the computer to have their own,=20
> private folders, to which they can refer with the common phrase. This is=20
> like you and I both saying "I am at home", yet meaning two different=20
> locations. But don't despair - look at the variable function @SHFOLDER - it=20
> can provide the true names of nearly every "folder". Youcan create a simple=20
> TakeCommand alias:
>=20
> alias MyHome=3D`*cdd %@shfolder[5]`
>=20
> and voila! You now have a command, MyHome to do what you want. BTW, the=20
> capitalization is for recognizability, TCMD ignores case in all but a very=20
> few cases (all related to processing strings).
 
| Is this something that is different in Win7? Because in WinXP, My
| Documents is a directory, \Documents and Settings\rob\My Documents.

The "My Documents" folder is mapped to the directory you mentioned above
only when you are logged in. It the current user is "Guest", the My
Documents folder is mapped to the directory \Documents and Settings\Guest\My
Documents. That's the difference between "folder" and "directory". Note also
that if you changed a username, the underlying directory is NOT renamed (at
least not in WinXP).

| What is the directory that maps to My Documents in Win7?

As I suggested, use the variable function @SHFOLDER[5] to find out. Only XP
spoken here... The basic concept of each users folders being mapped to
directories has not changed, but the name of the root directory has. You can
also try the command SET /V to display the variables HOMEDRIVE and HOMEPATH
which are combined into the variable USERPROFILE by the OS and passed as
part of the default environment when TCMD and TCC start.
--
HTH, Steve
 
> I have a folder called "My Documents" but typing 'CD "My Documents"',
> with Extended Directory Search enabled, fails to find it. Is this to be
> expected?

Yes. It has nothing to do with spaces in the name; it's because there is no
directory named "My Documents" in Windows 7 (or Vista). Microsoft renamed
it "Documents", and it's under \users\(yournamehere)\documents.

Windows 7 fakes a folder called "My Documents", which is redirected to
"Documents".
 

Similar threads

Back
Top