Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Tech Tips & Tricks
Tag Cloud
access audio black screen blue screen boot bsod connection crash desktop driver drivers dvd email error excel firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem recovery registry cleaner router safe mode screen slow sound spyware tdlwsp.dll trojan upgrade vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > General Technology > Tech Tips & Tricks >
XP-Command Prompt

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
Frecon's Avatar
Senior Member with 196 posts.
 
Join Date: Aug 2004
Location: London,ON; Canada
Experience: Intermediate
29-Jul-2005, 12:48 PM #1
XP-Command Prompt
I,m having trouble with a command. When i enter the following command
"C:\>attrib c:windows/system32 -h -s" without the quotes it keeps returning me to C:\>. Am i doing something wrong in regards to spaces and capitalizations? I,m not sure which switches to use and in what sequence. I hope this makes the question clearer. tks.

Last edited by Frecon : 29-Jul-2005 07:16 PM. Reason: Question not clear
DoubleHelix's Avatar
Distinguished Member with 12,784 posts.
 
Join Date: Dec 2004
Experience: A little of this...a little of that
29-Jul-2005, 12:53 PM #2
The command completed successfully.
ChuckE's Avatar
Distinguished Member with 2,229 posts.
 
Join Date: Aug 2004
Location: Redondo Beach, CA
Experience: Advanced
29-Jul-2005, 01:26 PM #3
With no message back, the simple returning back to the C:\ prompt, is the indication that it worked. You can verify by entering the command:
attrib c:\windows\system32
which should now return with " C:\windows\system32"

By the way, you really ought to use the proper syntax in entering the command, in that the "bash" (\ or back-slash) is used for directory separators and the "slash" (/) is used for switches in commands.
It is odd that the command worked anyway, but you should not depend on it. It is better to follow proper syntax, as in:
attrib c:\windows\system32 +h +s
__________________
Does this look infected to you? ...
RGregory's Avatar
Member with 67 posts.
 
Join Date: Jul 2005
Experience: Advanced
29-Jul-2005, 02:01 PM #4
If you go to the directory where the file is, and just type the attrib command, it will return with a list of files in the directory with their attributes listed.
ChuckE's Avatar
Distinguished Member with 2,229 posts.
 
Join Date: Aug 2004
Location: Redondo Beach, CA
Experience: Advanced
29-Jul-2005, 03:44 PM #5
Notice that Frecon changed the attributes of a directory.

To use the command, as you suggest, to additionally display the directories, you need to add "/s /d" UNLESS you specify just that one directory you are interested in.
Frecon's Avatar
Senior Member with 196 posts.
 
Join Date: Aug 2004
Location: London,ON; Canada
Experience: Intermediate
29-Jul-2005, 07:12 PM #6
Command Prompt
Thanks for all the suggestions but the closest i got was to have a list of two directories - system32 and 1386 but not the contents of the directories which was my quest. It said the "/s/d" was an invalid command whether i used the quotes or not. Further enlightenment wld be appreciated.

Last edited by Frecon : 29-Jul-2005 07:10 PM. Reason: spelling error
ChuckE's Avatar
Distinguished Member with 2,229 posts.
 
Join Date: Aug 2004
Location: Redondo Beach, CA
Experience: Advanced
29-Jul-2005, 07:47 PM #7
1) From your original posting you never said what it is that you wanted, and I still am not sure. But it looked like all you originally wanted to do was change the attributes of the system32 directory, and that is what we said you had done.

2) Now you mention that you got a list of the two directories (system32 and 1386 ??, perhaps you mean i386 ?? - and that's the first time you mentioned that one), but not the contents. That's confusing as well. What do you consider a list of the directory that the contents is not? To me that is the same thing. But perhaps you should just tell us just what it is that you really are striving for.

3) If you are getting an "invalid command" error when using the switches "/s /d" AND while you were using the "attrib" command then the reason is either you mistyped something OR you did not put a space between the two switches "/s" and "/d"
Look back at my first mention or those switches and see that I had a space there. Your mention of it does not show the space. AND NO YOU DO NOT USE THE QUOTES, (when did I use quotes in that bolded command line example?).
The command would be:
attrib c:\windows\system32 +h +s
to change the attributes of the system32 directory.

If that is not what you want to do, then what is it you want to do?
__________________
Does this look infected to you? ...
Frecon's Avatar
Senior Member with 196 posts.
 
Join Date: Aug 2004
Location: London,ON; Canada
Experience: Intermediate
29-Jul-2005, 09:00 PM #8
To ChuckE. Tks for the scolding. I know how to get to system 32 through c:/windows and see all the files. I wanted to further that knowledge a bit by trying to do the same thing from the command prompt and what i found on Google apparently was something different i.e. 'changing the attributes'. You all say that i had it right the first time and apparently changed the atrtibutes which is not what i had in mind. Now that i,ve made a mess?, can you help put me back where i was or finish what i was trying to do. thanks again.
DoubleHelix's Avatar
Distinguished Member with 12,784 posts.
 
Join Date: Dec 2004
Experience: A little of this...a little of that
29-Jul-2005, 09:07 PM #9
You successfully ran a command that removed the hidden and system attributes from the C:\Windows\System32 folder.

If you want to undo it, run the following at the C:> prompt:

C:>attrib C:\Windows\System32 +h +s

Your "mess" will be undone. Just get the slashes right. You've typed them here wrong. '\' is different from '/'.
Frecon's Avatar
Senior Member with 196 posts.
 
Join Date: Aug 2004
Location: London,ON; Canada
Experience: Intermediate
29-Jul-2005, 09:21 PM #10
Thank you ChuckE and DoubleHelix and others. Everything is back to normal. In future. i will try to ask the questions more completely and precisely. Thanks again.
ChuckE's Avatar
Distinguished Member with 2,229 posts.
 
Join Date: Aug 2004
Location: Redondo Beach, CA
Experience: Advanced
30-Jul-2005, 11:22 AM #11
Frecon, it is not so much a scolding as it is a request for details. But anyway...
To see the files, that is, to see the list of files in any directory, via the DOS prompt you just use the DIR command.

If you are in the directory of choice that you only need to type DIR and press return. To get into the directory of choice (but you don't need to be -read later) you can just use the CD somepath command, where somepath would be the required path to get to where you want to be.

There are additional switches you can add after the DIR command to additionally modify the results to list directories only, or hidden files, modify the display results. To find out what those switches are just add the single switch /? after the command, as in: DIR /?
The space is not needed here, after the DIR, but for consistency, and good practice, you ought to use the space. Also, case does not matter.

If you are not in the directory of choice you can still just specify the path to what you want to see the directory listing of. You can do that by additionally reading the DIR /? page. Part of that is like this:
DIR to get the list of where you are at.
DIR x: to get the list of another drive "x", which is usually the top, or root, but if you have a past path on that drive that you last set, the result will be of that drive's path.
DIR x:\ to get a list of that drive "x" and this will be of the root.
DIR \somedir\otherdir\nutherdir to get a list of the files from the current drive, but in the path specified from the root. This means it doesn't matter what directory you are in at the time, since you are specifying exactly how to get there from the root.
DIR somedir\otherdir\nutherdir to get a list of the files at the path that is in addition to the current path you are in (notice there was no lead "bash" (\) here. That means if you are in directory "C:\xdir\ydir" your results would be of the directory (assuming it exists) "C:\xdir\ydir\somedir\otherdir\nutherdir"
DIR x:\somedir\otherdir\nutherdir to get a list of files on the specified drive (which may or may not be the one you are on) and the exact directory path you specified (assuming it exists).

Hope some of that helps. And what really helps is picking up a simple book that explains all that, like the "Dummies" series (bad name, but good books) and also a bit of experimentation on your part. Good luck! and have fun!
__________________
Does this look infected to you? ...

Last edited by ChuckE : 30-Jul-2005 04:02 PM.
JohnWill's Avatar
Computer Specs
Moderator with 96,722 posts.
 
Join Date: Oct 2002
Location: South Eastern PA, USA
Experience: Advanced age & experience
30-Jul-2005, 04:06 PM #12
Quote:
Originally Posted by DoubleHelix
You successfully ran a command that removed the hidden and system attributes from the C:\Windows\System32 folder.

If you want to undo it, run the following at the C:> prompt:

C:>attrib C:\Windows\System32 +h +s

Your "mess" will be undone. Just get the slashes right. You've typed them here wrong. '\' is different from '/'.
YIKES! DON'T DO THAT! Most of the files in \WINDOWS\SYSTEM32 do not normally have the hidden and system attributes set, so you sure don't want to jump in there and make a bad situation worse! Take my system as an example, out of the 2056 files in \WINDOWS\SYSTEM32, here's the list that had any of those attributes set. I don't think setting all of them is a good idea...

A R C:\WINDOWS\system32\atl71.dll
A HR C:\WINDOWS\system32\cdplayer.exe.manifest
A R C:\WINDOWS\system32\ctl3dv2.dll
A R C:\WINDOWS\system32\e1000325.din
A R C:\WINDOWS\system32\e1000msg.dll
A R C:\WINDOWS\system32\IntelNic.dll
A R C:\WINDOWS\system32\KBDAL.DLL
A R C:\WINDOWS\system32\kbdaze.dll
A R C:\WINDOWS\system32\kbdazel.dll
A R C:\WINDOWS\system32\kbdblr.dll
A R C:\WINDOWS\system32\kbdbu.dll
A R C:\WINDOWS\system32\kbdcr.dll
A R C:\WINDOWS\system32\kbdcz.dll
A R C:\WINDOWS\system32\kbdcz1.dll
A R C:\WINDOWS\system32\kbdcz2.dll
A R C:\WINDOWS\system32\kbdest.dll
A R C:\WINDOWS\system32\kbdgkl.dll
A R C:\WINDOWS\system32\kbdhe.dll
A R C:\WINDOWS\system32\kbdhe220.dll
A R C:\WINDOWS\system32\kbdhe319.dll
A R C:\WINDOWS\system32\kbdhela2.dll
A R C:\WINDOWS\system32\kbdhela3.dll
A R C:\WINDOWS\system32\kbdhept.dll
A R C:\WINDOWS\system32\kbdhu.dll
A R C:\WINDOWS\system32\kbdhu1.dll
A R C:\WINDOWS\system32\kbdkaz.dll
A R C:\WINDOWS\system32\kbdkyr.dll
A R C:\WINDOWS\system32\kbdlt.dll
A R C:\WINDOWS\system32\kbdlt1.dll
A R C:\WINDOWS\system32\kbdlv.dll
A R C:\WINDOWS\system32\kbdlv1.dll
A R C:\WINDOWS\system32\kbdmon.dll
A R C:\WINDOWS\system32\kbdpl.dll
A R C:\WINDOWS\system32\kbdpl1.dll
A R C:\WINDOWS\system32\kbdro.dll
A R C:\WINDOWS\system32\kbdru.dll
A R C:\WINDOWS\system32\kbdru1.dll
A R C:\WINDOWS\system32\kbdsl.dll
A R C:\WINDOWS\system32\kbdsl1.dll
A R C:\WINDOWS\system32\kbdtat.dll
A R C:\WINDOWS\system32\kbdtuf.dll
A R C:\WINDOWS\system32\kbdtuq.dll
A R C:\WINDOWS\system32\kbdur.dll
A R C:\WINDOWS\system32\kbduzb.dll
A R C:\WINDOWS\system32\kbdycc.dll
A R C:\WINDOWS\system32\kbdycl.dll
A HR C:\WINDOWS\system32\logonui.exe.manifest
A S R C:\WINDOWS\system32\msstkprp.dll
A R C:\WINDOWS\system32\msvcp71.dll
A R C:\WINDOWS\system32\msvcr71.dll
A HR C:\WINDOWS\system32\ncpa.cpl.manifest
A HR C:\WINDOWS\system32\nwc.cpl.manifest
R C:\WINDOWS\system32\perfmon.msc
A R C:\WINDOWS\system32\Prounstl.exe
R C:\WINDOWS\system32\rsop.msc
A HR C:\WINDOWS\system32\sapi.cpl.manifest
A HR C:\WINDOWS\system32\WindowsLogon.manifest
A HR C:\WINDOWS\system32\wuaucpl.cpl.manifest
__________________
Remember: Data you don't have at least two copies of is data you don't care about.

Microsoft MVP - User Desktop Experience
ChuckE's Avatar
Distinguished Member with 2,229 posts.
 
Join Date: Aug 2004
Location: Redondo Beach, CA
Experience: Advanced
30-Jul-2005, 04:18 PM #13
Without specifying the files, or wildcard of files, to change, just the directory would have been made unhidden (the +h) and made un-system-like (the +s). No worries, other than making the system32 folder visible.

By the way, Frecon, you do not have to make the hidden folders un-hidden to do a DIR of them. If you specify a folder, hidden or not, the internal visible contents will be listed.

One more point, Frecon, instead of using the command prompt to see these files, why don't you just use Windows Explorer? If the files, or directories, are hidden you can easily make them visible for you by changing the Folder options to view hidden files and folders.
(In Windows Explorer, select Tools>Folder Options, tab View, setting Hidden files and folders=Show...)
__________________
Does this look infected to you? ...
Frecon's Avatar
Senior Member with 196 posts.
 
Join Date: Aug 2004
Location: London,ON; Canada
Experience: Intermediate
31-Jul-2005, 12:26 AM #14
To ChuckE and John Will. Thank you for taking the trouble to expand on previous comments and answers to my newbie attempt at the command prompt. I somewhat innocently took a command out of thin air to see if i cld get a directory listing using the command prompt. This came about somewhat because every time i look at a directory list in WE it seems that there are less files or a lot more different files than the last time i looked. I thought going through the command prompt wld give a definitive list of the folders and sub-folders (files). That,s where i came from and i,ll take your advice into account for future progress. Thanks again.
ChuckE's Avatar
Distinguished Member with 2,229 posts.
 
Join Date: Aug 2004
Location: Redondo Beach, CA
Experience: Advanced
31-Jul-2005, 05:02 PM #15
Frecon, learning DOS can be rewarding, archaic, frustrating, slow, useful, painful, and just plain fun. If that is your intent then invest $10-20 and find one of those dummy-type books.

Also there is a fair bit of details built right into the commands themselves. Just type the command you are curious about and follow with a " /?" (no quotes, just a <space><slash><question mark>). That may show you some usage information and syntax details.

One last point, you might even type "HELP" on a line (again NO QUOTES!) and press the Enter key. If HELP is there, you will see a list of one-liner details about most of the commands.

Again, have fun.
__________________
Does this look infected to you? ...
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 10:18 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.