Monday, September 1, 2008

Windows Command Prompt (part 5)

There are a long way to finish this CMD tutorial. Step by step, command by command I’ve writed to you, againts all ods which come through me. Yeah, feel too lazy to do and boring is the main problem. But, this is a test for me…… hahaha…

Ok.. next!!

  • COPY, Used to copy one or more files to another location. Simple example if you wanna copy your files in C:\Documents and Setting\a.doc to folder Files in drive D:

    copy C:\”Documents and Setting”\a.doc D:\files

    (Remember, you have to type the source files extension.)

There are space to sepperated between source and destination folder/file. For another example, if you already in source folder (C:\Documents and Setting\), you can straight to write filename, become:

copy a.doc d:\files

This command comes with some usefull option. Like /V to verify that the new files are written correctly, or /Y to overwrite your same filename in destination folder.

  • DATE. Used to displays or sets the date. To view now date, just type

    date /t

If you just type date, cmd will bring you to enter the new date. Just press “enter” key if you don’t want to change the date

  • DEL. Used to deletes files. DEL command is equal with ERASE command, they both also has the same syntax. For example, if you want to delete files named virus.exe, just type:

del virus.exe

this command comes with five option, there are /P, to give you a confirmation, /F to force deleting on read-only files, /S to delete specified files from all subdirectories, /Q for quite mode and /A to delete file with attributes. For Example, you want to delete a file named virus.exe which has read-only, hidden and system-files attribute. Just type:

del /f /q /arhs virus.exe

You can also use wildcard for this operation. Like del *.*, or del *.exe

  • DIR. DIR is used to displays a list of files and subdirectories in a directory. This command with so many option, so I will explain which option that I think it’s important. but of course, you can just use DIR with no option.

/A, to displays files with specified attributes. Just like ATTRIB, there are five attributes. Example in use : dir /ah (to display hidden files/folders), dir ./as (to display system-files.

/O, to list by files in sorted order. You can order by Name (N), Extension (E), Group (G), Size (S), Date (D). Example in use: dir /on (to order by name), dir /od (order by date).

/T, to controls which time field displayed ir used for shorting, depends on Creation (C), Last Access (A), or Last Written (W). For example you want to know which is the last accessed file : dir /ta

You can pause DIR result using /P or “| more” (pipe). So, it would become dir | more, or dir /p. To continue, press enter key

Related Posts by Categories



0 comments:

Template by - Abdul Munir - 2008