0

I have several ghost and other unneeded files of the type C:\ xxx. I can see them when I click on "Computer". But when I try to remove them by using Command Prompt it automatically starts at C:\USERS\DAN, downstream from the ghosts.

Is there a way to see and remove files of the C:\ xxx type?

1
  • Why don't you just go backwards one directory using the command "cd .."
    – Ramhound
    Aug 25, 2015 at 19:03

2 Answers 2

1

Have you tried simply typing:

cd C:\

into the command prompt. Then, as an Administrator:

DEL /F <unneeded file(s)>

If, for any reason, the files aren't on the C: drive you will have to switch drives like this:

<drive letter>:

i.e

D:
2
  • 1
    You can also switch to a different drive letter by adding the /D switch. For example, from C: switch to E: with CD /D E:\ Aug 25, 2015 at 19:47
  • I totally forgot about that. Haven't used the CMD for a long time, thanks for the reminder, @Twisty! Aug 25, 2015 at 19:50
1

From the Command Prompt, you switch to the "root" of the C: drive using the CD command as follows:

CD C:\

You can then view the files in the root directory with the command:

DIR

Finally, to delete files use the DEL command as follows:

DEL filename /F

Or to delete a folder use:

RD foldername

If the folder contains any subfolders, you must add the /S parameter:

RD foldername /S

You can view help for all of these commands by typing the command name followed by /?. For example:

CD /?
1
  • Ninja'd me. Well put. Aug 25, 2015 at 19:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .