Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access My Documents from CMD

Status
Not open for further replies.

quaked2023

Technical User
Jan 22, 2004
105
MX
Hi!:

I feel silly asking this, but how can i access my documents from the CMD prompt?. Because if i type cd my documents it says the there are too many parameters - documents. Any ideas??? Thanks in advance!

-The Only Privacy Left Is The Inside Of Your Head!- QUAKED2023
 
Try this from the c:\cd \documents and settings\(your account)\my documents

The (my account) would be whatever your accunt is on that system less the brackets.

"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy"
Albert Einstein
 
Try it with quoation marks: cd "My Documents"

This will be a very interesting discussion. The error that you've posted indicates that you are trying to change to the lower level directory 'my' with some additional parameter 'documents' and Windows doesn't know what to do with that extra parameter. This is common behavior with a space in the directory name - for many (even non-Windows) operating systems.

Now, with that said, before posting I tested this just as you have written - without the quotation mark. Because of the reasons that I've mentioned above, I expected to get the same error that you did - but I did not! The command cd my documents actually did change to the 'My Documents' directory.

Why did it work on mine? quaked2023, What SP level are you using? I'm quite curious about this.
 
Some time ago there was a post saying that "command" and "cmd" reacts differently in this matter... but I can't find it right now.

However, I often use the short names:

Code:
dir /x

and

Code:
cd docume~1

That will take you to "Documents and Settings" from the "C:" drive.

Cheers,

X
 
Cmd.exe

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Username>cd my documents

C:\Documents and Settings\Username\My Documents>




Command.exe

Microsoft(R) Windows DOS
(C)Copyright Microsoft Corp 1990-2001.

C:\DOCUME~1\Username>my documents
'MY' is not recognized as an internal or external command,
operable program or batch file.

C:\DOCUME~1\Username>




Use CMD as your command interpreter so you can use full length folder names with spaces.


COMMAND.COM vs. CMD.EXE.
 
When using the CMD.EXE you might try to use the Tab-key when entering a directory.

Startup your CMD.EXE
Enter cd \
Now enter cd docu <Tab> and it should automagically expand to cd "Documents and Settings"
If the command doesn't expand, then a directory (or other file beginning with 'docu') is not present in the current directory.

HTH
 
Hi!:

Thanks to all... this is very strange, because i tried to open my documents with command.com and got the same result, however after that i tried with CMD and it worked!!!!!!, why??? I mean before it didn't worked, could this be a bug???, by the way i'm running Windows XP Media Center Edition, that is Windows XP [Version 5.1.2600]... Thanks again for your answers, if i find an answer to why this happened, i'll post it right away, thanks again!

-The Only Privacy Left Is The Inside Of Your Head!- QUAKED2023
 
command.com is the old version, more for compatibility with older software. So it does react differently.
I always use cmd.
Also, another trick you could use that makes your command a bit more universal is:

cd %userprofile%\My Documents

Then you don't have to type the docs & settings\username.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top