Extended directory search - spaces in names

Nov 14, 2008
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_
 
May 20, 2008
3,515
4
Elkridge, MD, USA
| 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
 
D

drrob1

Guest
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).
 
May 20, 2008
3,515
4
Elkridge, MD, USA
| 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
 

rconn

Administrator
Staff member
May 14, 2008
12,345
150
> 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
Thread starter Title Forum Replies Date
fishman@panix.com HELP!! I just updated to Version 28 and as usual I cannot make extended directory search work. Support 2
G Extended directory search not working Support 4
J Extended directory search has stopped working Support 9
J Extended directory search - cure by renaming tcmd.ini Support 10
J Initialise; Alias; Extended directory search Support 2
vefatica Disable extended directory searches (completely)? Support 8
vefatica Extended directory searches? Support 6
fishman@panix.com Extended Directory Searches are not working for me in CDD Support 9
C See if a file name matches extended range. Support 15
gschizas Fixed Cannot use extended path to delete invalid file Support 3
M Problem with Extended Search and non-ASCII characters in directories names Support 3
S Problem with extended wildcards Support 1
Y TCDIALOG extended Support 1
C extended DIR syntax? Support 7
J Extended support Support 0
rconn Extended Support keys sent Support 0
D How to use multi-line DO to loop through first level directory names Support 5
D ParentDirectory does not update directory history Support 6
samintz CDD to non-existent directory hangs Support 2
gworley rd (Remove Directory) gives interesting error: Support 2
D Directory History Window with wildcard search Support 3
D How to? Skip removing directory (RMDIR) without error message Support 2
gentzel Directory stack empty when running TCEXIT? Support 9
M WAD "Pictures" directory is empty in TCC but not in CMD or Explorer Support 4
G Local Directory Corruption Support 11
Jay Sage Directory Alias Access to FTP Servers Support 2
Joe Caverly DIRectory Colorization in v25 Help File Support 0
K copy changing destination current directory Support 1
thorntonpg option /u not working The directory name is invalid Support 5
J built in file explorer - how do i go back "up" the directory? Support 2
Joe Caverly Using a Directory Alias with @iniwrite fails Support 14
A Installer /extract: extracts into current directory if target not exists Support 12
Charles Dye Ctrl-Shift-Up doesn't update directory history Support 1
CWBillow Editing in the root directory of windows 10 Support 6
D Directory stack empty Support 1
J directory or folder to start in Support 2
M How to unlock a directory Support 1
Alpengreis Fixed TCMD FileExplorer Start-Directory problem Support 4
R V19 - At startup, TCC save directory in the directory history list Support 2
C Touch command — I Need to touch matching files in another directory. Support 5
nickles Move takecommand.18.0.key location to installation directory Support 4
vefatica TCMD's current directory? Support 4
J How to set working directory Support 10
nickles How to? Follow a JUNCTION type directory link Support 9
Steve Pitts WAD Strange output from DEL of a non-existent directory Support 7
I tab completion with directory commands Support 7
vefatica Start-up directory for new tabs? Support 7
cgunhouse Problem with CALL and Directory Aliases in V17 Support 9
vefatica FFIND /S, find directory with specified name? Support 7
David Wilbanks How to make new tab open in same directory as previous tab? Support 4

Similar threads