Jump to content
xisto Community
Sign in to follow this  
SpiderVV

[xp]some Useful Cmd Tricks For things you cant normally do...

Recommended Posts

Here are some Command Prompt tricks I have found useful over the years...

 

 

Shutdown Commands

Shutting Down

 

I sometimes find that, especially after having my computer on for ages, that Windows will simply not shut down. Sometimes a few things will close, but it get's stuck or there ends up being loads of programs that want to be ended first...

 

1. Open up command prompt. (Start > Run... : Enter "command" or "CMD")

2. Type "shutdown [PARAM]". Replace [PARAM] with one of these parameters...

 

-i - will display a dramatic windows interface telling you that the computer will shutdown in xx seconds.

 

-s - shut down the computer.

 

-r - restart the computer

 

-t [xx] - to be used with the "i" parameter. Customize the amount of seconds till shutdown (replace [xx] with seconds)

 

-c [abc] - to be used with the "i" param. Customize the message that shows on the shutdown message. (replace [abc] with whatever text you like. 127 letter max!)

 

-f - this is a useful one! It shuts down the computer without waiting for dead programs to end. It will end all the programs immediately.

 

Aborting A Shutdown

 

It is common for us to be in a situation where the workstation is shutting down when we quite simply don't want it to! Sometimes this is when we cause a big error, but it can also be due to malware or just general "Windows stupidness" :P

 

1. Open up command prompt. (Start > Run... : Enter "command" or "CMD")

2. Type "shutdown -a" and hit Enter(Return or w/e you wanna call it).

 

Note: You may have to repeat this a few times as it seems to not always abort first time :D

 

 

Browsing For when explorer just won't do!

 

General Browsing

 

If explorer is giving you errors saying your access is denied or something, you can try using Command Prompt.

 

1. Open up command prompt. (Start > Run... : Enter "command" or "CMD")

2. You will probably be in you system32 directory, as that is where cmd.exe is located. Type "C:" to go to you're C drive.

3. If you want to go to a different drive type "[DRIVE]:".

4. Now, type "CD [DIR]" to go to a directory.

5. If you want to see what's in your current directory, type "dir".

6. If you want to go back into a previous directory, do: "CD [DRIVE]\[DIR]".

7. If you know the exact path, you can type that too!

 

Here is what I would type if I was trying to find a file in "My Documents", but didn't exactly know whether it was in "Administrator" or "All Users".

C:CD Documents and SettingsCD AdministratordirCD C:\Documents and Settings\CD C:\Documents and Settings\All users\My Documentsdir
Simples! Note though, that Command Prompt may still not have access to everywhere, but will have alot more access than explorer.exe!

 

Opening A File

 

Simply follow the instructions for "General Browsing" and do this when you have done "dir" to find your file. Read what the list says and when you find the file that you want, follow this step:

 

1: Type [FILENAME].

 

[FILENAME] - Your files name, I.E: secrets.txt - Note that if your file name contains spaces, you must wrap it in double quotes (" ").

 

Copy, Move, Delete

I like to call this "CMD".

 

Copying

No, not illegally.

Sometimes, we will be unreasonably denied permissions to copy something our own computer... Yes, our own computer! The thing WE bought and WE have control over telling us that we can't do something on it! Fortunately, there is a way around this...

 

1. Open up command prompt. (Start > Run... : Enter "command" or "CMD")

2. Locate the directory where the file you want to copy is (see: Browsing)

3. Use this command: "copy [FILENAME] [PATH] [PARAM]". Using parameters...

[FILENAME] - Replace with file name. IE: myfile.txt

 

[PATH] - Where the file should go (note: start with drive. IE: C:\Documents and Settings\My Documents\ etc.)

 

/v - Verifies the files get copied properly

/y - Overwrites other files without warning.

/-y - Gives a warning if overwriting files.

 

 

 

Moving

 

You can move a file using the same principle as with copying. Just replace "copy" with "move". Note that some parameters from copy will not work here. Use "move /?" to see the available parameters.

 

 

Deleting

 

Useful for troublesome files!

 

By now you should be used to using Command Prompt!

 

1. Open up command prompt. (Start > Run... : Enter "command" or "CMD")

2. Locate the directory where the file you want to delete is (see: Browsing)

3. Use this command: "del [FILENAME] [PARAM]".

3a. You can also use: "erase [FILENAME] [PARAM]". Again, use these params...

 

[FILENAME] - Your file or directory name or path.

 

/p - Prompts for confirmation before deleting files.

/f - Force the file to be deleted (useful for malware!).

/q - Quiet Mode. Don't ask if ok to delete (also useful for malware!).

/a [PARAM] - For use with directory deleting. Use these params:

 

R : Read-only files.

S : System files.

H : Hidden files.

A : Files ready for archive.

- : Prefix. Means "not".

 

 

"del" and "erase" are indeed, slightly different. But it shouldn't matter too much.

 

You can also bulk copy, move and delete.

 

 

 

 

Hope you enjoyed this tutorial... I didn't enjoy writing it as much :)

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.